tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <>
Subject transaction rolls back when returning from a remove method of a SFSB
Date Mon, 14 Dec 2009 10:13:17 GMT

I have a Stateful session bean with three method preProcess, process and
postProcess. the postProcess method marked with @Remove 
these three methods are called in one method of a stateless session bean.
After calling the postProcess the transaction will mark to rollback. I put a
bunch of System.out to pring out getRollbackOnly() of the session context
and I am sure no exception occured. At the point just before returning from
postProcess the log shows the getRollbackOnly() is false but in callee
method right after this method invocation getRollbackOnly() is true!!!! 

Does anybody know what the problem is? 

Furthermore, When I comment out the @Remove annotation the whole transaction
works fine but I don't know what will happen on the deserted stateful
session bean which is not destroyed manually!

class MyStatefullSB {
   public void postProcess() { 
     logger.debug(sc.getRollbackOnly()); //prints out false 


class MyStatelessSB {

   public void someMethod() { 

      logger.debug(sc.getRollbackOnly()); //prints out true!!!! 


Mohammad Norouzi

Help each other to reach the future faster Pixelshot Photoblog Brainable Blog 

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message