Originally posted by yamini nadella:
EJBContext.setRollbackOnly() for CMT is similar to UserTrasaction.setRollbackOnly for BMT.
is it correct?
It's exactly the same. The specs had to grant the bean provider the possibility to mark a transaction for rollback, even if the bean provider opted for BMT.
To check whether a transaction has been marked for rollback, however, things are different:
With CMT, users will use EJBContext.getRollbackOnly()
With BMT, users will use UserTransaction.getStatus()
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD