This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes BMT & CMT in ejbCreate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply 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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: BMT & CMT in ejbCreate
 
Similar Threads
Question on pg 196 HFE - NO CMT in ejbcreate
Doubts in CMT vs BMT beans
EJB3 is it possible to mix BMT and CMT?
setRollBack() Query
EJB2.0 stateful session bean ejbCreate()