Originally posted by Omis Hein:
I am trying to understand why a Stateful session bean with BMT, may
access SessionContext.getUserTransaction() in its ejbCreate/ejbRemove/ejbActivate and ejbPassivate methods.
But a CMT Stateful session bean may NOT access SessionContext.getRollbackOnly()/SessionContext.setRollbackOnly() in these same methods.
Thanks.
If you declare your bean to use CMT, then it's all or nothing, you can't suddenly use the container's transaction bits because the container is now responsible for the transaction processing. In other words, why use CMT if you want to make BMT style calls? Hello? If you use BMT however, the container is hands-off (karate pose) and you can fiddle with its transaction calls. Make sense?
Probably more to it but there's a start.