org.jboss.ejb3.stateful
Class StatefulSessionContextImpl
java.lang.Object
org.jboss.ejb3.stateful.StatefulSessionContextImpl
- All Implemented Interfaces:
- java.io.Serializable, javax.ejb.EJBContext, javax.ejb.SessionContext
public class StatefulSessionContextImpl
- extends java.lang.Object
- implements java.io.Serializable, org.jboss.ejb3.context.spi.SessionContext
A session context that is serializable.
Since a session context can be serialized with a bean it must not have a
direct reference to StatefulBeanContext. Direct instantiation of a
StatefulSessionContextImpl after activation is also not possible, because
the bean is than not yet in cache. Therefore we use a delegate.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StatefulSessionContextImpl
public StatefulSessionContextImpl(java.lang.String containerGuid,
java.lang.String containerClusterUid,
java.lang.Object id,
boolean isClustered)
StatefulSessionContextImpl
public StatefulSessionContextImpl(StatefulBeanContext beanContext)
getBusinessObject
public <T> T getBusinessObject(java.lang.Class<T> businessInterface)
throws java.lang.IllegalStateException
- Specified by:
getBusinessObject in interface javax.ejb.SessionContext
- Throws:
java.lang.IllegalStateException
getContextData
public java.util.Map<java.lang.String,java.lang.Object> getContextData()
- Specified by:
getContextData in interface javax.ejb.EJBContext
getDelegate
protected org.jboss.ejb3.context.spi.SessionContext getDelegate()
getEJBLocalObject
public javax.ejb.EJBLocalObject getEJBLocalObject()
throws java.lang.IllegalStateException
- Specified by:
getEJBLocalObject in interface javax.ejb.SessionContext
- Throws:
java.lang.IllegalStateException
getEJBObject
public javax.ejb.EJBObject getEJBObject()
throws java.lang.IllegalStateException
- Specified by:
getEJBObject in interface javax.ejb.SessionContext
- Throws:
java.lang.IllegalStateException
getInvokedBusinessInterface
public java.lang.Class<?> getInvokedBusinessInterface()
throws java.lang.IllegalStateException
- Specified by:
getInvokedBusinessInterface in interface javax.ejb.SessionContext
- Throws:
java.lang.IllegalStateException
getManager
public org.jboss.ejb3.context.spi.SessionBeanManager getManager()
getMessageContext
public javax.xml.rpc.handler.MessageContext getMessageContext()
throws java.lang.IllegalStateException
- Specified by:
getMessageContext in interface javax.ejb.SessionContext
- Throws:
java.lang.IllegalStateException
getCallerIdentity
public java.security.Identity getCallerIdentity()
- Specified by:
getCallerIdentity in interface javax.ejb.EJBContext
getCallerPrincipal
public java.security.Principal getCallerPrincipal()
- Specified by:
getCallerPrincipal in interface javax.ejb.EJBContext
getEJBHome
public javax.ejb.EJBHome getEJBHome()
- Specified by:
getEJBHome in interface javax.ejb.EJBContext
getEJBLocalHome
public javax.ejb.EJBLocalHome getEJBLocalHome()
- Specified by:
getEJBLocalHome in interface javax.ejb.EJBContext
getEnvironment
public java.util.Properties getEnvironment()
- Specified by:
getEnvironment in interface javax.ejb.EJBContext
getRollbackOnly
public boolean getRollbackOnly()
throws java.lang.IllegalStateException
- Specified by:
getRollbackOnly in interface javax.ejb.EJBContext
- Throws:
java.lang.IllegalStateException
getTarget
public java.lang.Object getTarget()
getTimerService
public javax.ejb.TimerService getTimerService()
throws java.lang.IllegalStateException
- Specified by:
getTimerService in interface javax.ejb.EJBContext
- Throws:
java.lang.IllegalStateException
getUserTransaction
public javax.transaction.UserTransaction getUserTransaction()
throws java.lang.IllegalStateException
- Specified by:
getUserTransaction in interface javax.ejb.EJBContext
- Throws:
java.lang.IllegalStateException
isCallerInRole
public boolean isCallerInRole(java.security.Identity role)
- Specified by:
isCallerInRole in interface javax.ejb.EJBContext
isCallerInRole
public boolean isCallerInRole(java.lang.String roleName)
- Specified by:
isCallerInRole in interface javax.ejb.EJBContext
lookup
public java.lang.Object lookup(java.lang.String name)
- Specified by:
lookup in interface javax.ejb.EJBContext
setRollbackOnly
public void setRollbackOnly()
throws java.lang.IllegalStateException
- Specified by:
setRollbackOnly in interface javax.ejb.EJBContext
- Throws:
java.lang.IllegalStateException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
wasCancelCalled
public boolean wasCancelCalled()
- Specified by:
wasCancelCalled in interface javax.ejb.SessionContext