According to HFEJB p196, a bean can use the session context to get a transaction reference and call methods on it for BMT beans, If there is any transaction context in ejbCreate why cant we use it to roll back and find if its already set to roll back using the session context for a CMT bean !! I am all confused about when one can do what bean things?
I guess the transactions for a CMT bean are defined on a method in the DD and the bean will not know about it unless it is in that method execution, in order t oset it to rollback or ask if it is set to rollback only. please Correct me if what i am thinking is wrong.
One can not specify transaction attributes for ejbCreate<METHOD> method of a CMT Session Bean. Please refer to page number 498 of HF EJB.
In short, for CMT Session bean's ejbCreate<METHOD> method, there is no transaction context. Hence, we can not use SessionContext's following methods in ejbCreate<METHOD> method: 1] public void setRollbackOnly() 2] public boolean getRollbackOnly()
Does that answer your doubt?
Regards,<br />Sandesh<br />(SCJCP, SCWCD, SCBCD - 99%, OCP-1)<br /> <br />Either find a way or create one.