org.objectweb.jonas_ejb.container
Class JStatefulContext

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.container.JContext
        |
        +--org.objectweb.jonas_ejb.container.JSessionContext
              |
              +--org.objectweb.jonas_ejb.container.JStatefulContext
All Implemented Interfaces:
javax.ejb.EJBContext, java.io.Serializable, javax.ejb.SessionContext, javax.transaction.Synchronization

public class JStatefulContext
extends JSessionContext
implements javax.transaction.Synchronization

This class extends JSessionContext in case of Stateful Session Bean.

Author:
Philippe Coq, Philippe Durieux
See Also:
Serialized Form

Fields inherited from class org.objectweb.jonas_ejb.container.JSessionContext
bs, ismarkedremoved
 
Fields inherited from class org.objectweb.jonas_ejb.container.JContext
bf, cont, home, instance, localhome, roleGuard, tm
 
Constructor Summary
JStatefulContext(JSessionFactory bf, javax.ejb.SessionBean sb, boolean sync)
          Constructs a JStatefulContext
 
Method Summary
 void afterCompletion(int status)
          The afterCompletion method is called by the transaction manager after the transaction is committed or rolled back.
 void beforeCompletion()
          This beforeCompletion method is called by the transaction manager prior to the start of the transaction completion process.
 void setRemoved()
          set this instance as removed
 
Methods inherited from class org.objectweb.jonas_ejb.container.JSessionContext
getEJBLocalObject, getEJBObject, getInstance, initSessionContext, isMarkedRemoved
 
Methods inherited from class org.objectweb.jonas_ejb.container.JContext
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getUserTransaction, isCallerInRole, isCallerInRole, setRollbackOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.ejb.EJBContext
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getUserTransaction, isCallerInRole, isCallerInRole, setRollbackOnly
 

Constructor Detail

JStatefulContext

public JStatefulContext(JSessionFactory bf,
                        javax.ejb.SessionBean sb,
                        boolean sync)
Constructs a JStatefulContext
Parameters:
bf - - the Session Factory
sb - - the Enterprise Bean instance
sync - - True if implements SessionSymchronization.
Method Detail

beforeCompletion

public void beforeCompletion()
This beforeCompletion method is called by the transaction manager prior to the start of the transaction completion process. This method executes in the transaction context of the calling thread.
Specified by:
beforeCompletion in interface javax.transaction.Synchronization

afterCompletion

public void afterCompletion(int status)
The afterCompletion method is called by the transaction manager after the transaction is committed or rolled back. This method executes without a transaction context.
Specified by:
afterCompletion in interface javax.transaction.Synchronization
Parameters:
status - The status of the transaction completion.

setRemoved

public void setRemoved()
                throws java.rmi.RemoteException,
                       javax.ejb.RemoveException
set this instance as removed
Overrides:
setRemoved in class JSessionContext