posted 16 years ago
Hi,
I guess this is not 100% right. You can use setRollbackOnly() and getRollbackOnly() in CMT thats OK. But even in BMT you can use setRollbackOnly(). The difference is that you use for CMT methods coming directly from EJBContext (setRollbackOnly() and getRollbackOnly()). For the BMT you have to call EntityContext.getUserTransaction() to get a UserTransaction object and there you can use setRollbackOnly() as well, but there is no getRollbackOnly() method available here, instead getStatus() can be used to check if someone called already setRollbackOnly() before. So more or less this is the same for both BMT and CMT just available in different objects and with a different name for the getter method. The difference between setRollbackOnly() and rollback() is more the fact that rollback() directly rolls back the transaction where setRollbackOnly() just markes the transaction for rollback but continues up to the end of the transaction. Only then the transaction is also rolled back. Hope that helps?!