aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Transaction context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Transaction context" Watch "Transaction context" New topic
Author

Transaction context

Tejas Bavishi
Ranch Hand

Joined: Jul 28, 2003
Posts: 73
Hi

Could someone answer the following question :
Is transaction context propagated through different stateless session beans method call hierarchy. I am referring to trans-attribute.

Suppose, method X of Stateless session bean A -> calls -> method Y of Stateless session bean B, and the trans-attribute of Stateless session A is Requires and trans-attribute of Stateless session B is supports. Will the transaction context propagate from A's method to B's method ?

Any other points one should know when working with transactions and stateless session beans ?

Thanks in advance for your help!
gopi chillakuru
Greenhorn

Joined: Dec 17, 2004
Posts: 14
It doesn't matter whether the bean is session/entity/MDB, the transaction context from Required transaction attribute method to Supports transaction attribute method.

Supports - runs same as calling method transaction context.
I hope this helps
Thiru Thangavelu
Ranch Hand

Joined: Aug 29, 2001
Posts: 219
When the bean B's method Y transaction attribute is "supports", it means if the calling method (X of A) has transaction, Y will run in caller's transacation. If the caller doesn't have transaction, then Y will run in unspecified transaction context. So, it will depends on bean B's trasaction attribute. not A's.

Hope this helps.


Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Transaction context