aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes BMT & CMT in ejbCreate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "BMT & CMT in ejbCreate" Watch "BMT & CMT in ejbCreate" New topic
Author

BMT & CMT in ejbCreate

Srinivasan Rengan
Ranch Hand

Joined: Nov 07, 2004
Posts: 122
Hi All,

I have a significant point to get clarified. In case of stateful session bean, we will not be able to call methods on the (BMT) user transaction object, inside setSessionContext. Why is this? But, we will be able to do the same thing in the business method. What determines the access to the transaction method access? Also, how is this different incase of CMT based methods(setRollbackOnly & getRollbackOnly).

Thanks:


SCJP, SCWCD, SCBCD (EJB 2.x and EJB 3), OCA, SCDJWS
Ankit Doshi
Ranch Hand

Joined: Dec 04, 2002
Posts: 222
In case of stateful session bean, we will not be able to call methods on the (BMT) user transaction object, inside setSessionContext. Why is this?


That's because setSessionContext runs under unspecified transaction context. Look at this page on Frederic's site. This table summarizes the various methods of various beans and their transaction context association. The spec page numbers, from where these details are taken, are also mentioned on the table.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: BMT & CMT in ejbCreate