org.openejb.core.stateful
Class StatefulContext

java.lang.Object
  extended by org.openejb.core.CoreContext
      extended by org.openejb.core.stateful.StatefulContext
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EJBContext, javax.ejb.SessionContext

public class StatefulContext
extends CoreContext
implements javax.ejb.SessionContext

This class imposes restrictions on what stateful SessionBean methods can access which SessionContext methods. While the CoreContext handles restrictions related to container- vs. bean-managed transaction beans, this class manages restrictions related to the position of the bean in its life-cycle to the SessionContext operation being performed. Restrictions are specified in the EJB specification. The CoreContext actually fulfills the request, this class just applies restrictions on access.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openejb.core.CoreContext
EJBHOME_METHOD, EJBOBJECT_METHOD, ROLLBACK_METHOD, SECURITY_METHOD, USER_TRANSACTION_METHOD
 
Constructor Summary
StatefulContext()
           
 
Method Summary
 void checkBeanState(byte methodCategory)
           
 javax.xml.rpc.handler.MessageContext getMessageContext()
           
protected  EjbObjectProxyHandler newEjbObjectHandler(RpcContainer container, java.lang.Object pk, java.lang.Object depID)
           
 
Methods inherited from class org.openejb.core.CoreContext
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEJBLocalObject, getEJBObject, getEnvironment, getPrimaryKey, getRollbackOnly, getTimerService, 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.SessionContext
getEJBLocalObject, getEJBObject
 
Methods inherited from interface javax.ejb.EJBContext
getCallerIdentity, getCallerPrincipal, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, setRollbackOnly
 

Constructor Detail

StatefulContext

public StatefulContext()
Method Detail

checkBeanState

public void checkBeanState(byte methodCategory)
                    throws java.lang.IllegalStateException
Specified by:
checkBeanState in class CoreContext
Throws:
java.lang.IllegalStateException

newEjbObjectHandler

protected EjbObjectProxyHandler newEjbObjectHandler(RpcContainer container,
                                                    java.lang.Object pk,
                                                    java.lang.Object depID)
Specified by:
newEjbObjectHandler in class CoreContext

getMessageContext

public javax.xml.rpc.handler.MessageContext getMessageContext()
Specified by:
getMessageContext in interface javax.ejb.SessionContext


Copyright © 1999-2011 OpenEJB. All Rights Reserved.