Hi Can anybody please explain page 199 of HFE to me. The doubts I have is: how can business methods in Session bean can do the following 1. force a transaction to rollback(CMT beans) 2. find out if the transaction already been set to rollback (CMT beans). As both of the above relates to CMT beans, It shouldn't be allowed from Session beans. I think CMT is only for Entity beans. Can somebody please explain. Regards Mini
You can specify transactions by methods also. So if you specify a transaction attribute for a method in Session Bean then it is CMT. Session and Entity differ in handling Persistance [ April 10, 2004: Message edited by: Santosh Ram ]
All type of beans can participate in transactions. The interface javax.ejb.EJBContext declares the methods setRollbackOnly() and getRollbackOnly() to force a transaction to rollback and to test if the transaction has been marked for rollback respectively.