Hi, I have used 4 EJBs in my project. One session EJB and 3 Entity EJBs. The client invokes methods on the session EJB and the session EJB, in turn invokes the methods of the entity EJBs. I have set the transaction attributes as shown below - For Session EJB - RequiresNew For all entity EJBs - Requires Is it OK? Thanks - Rajib
Whether it is OK really depends on what you want to be occuring ;-) However you should not encounter too many problems with those settings.
The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="http://www.orderware.net" target="_blank" rel="nofollow">http://www.orderware.net</a>
HI The setting of requires on entity beans and requiresnew on session bean means the following. When you invoke a method on session bean a new transaction is started. Since within this method you are invoking methods on entity beans , the transaction context is propogated to the entity bean method(because of requires setting). If your requirement is met by the condition that the methods in session bean and entity bean to be in same transaction context then your settings are ok. Hope this helps Cheers Ram