Package com.sun.ejb.containers
Class AbstractSessionContextImpl
- java.lang.Object
-
- com.sun.ejb.containers.EJBContextImpl
-
- com.sun.ejb.containers.AbstractSessionContextImpl
-
- All Implemented Interfaces:
ComponentContext,jakarta.ejb.EJBContext,jakarta.ejb.SessionContext,Serializable,org.glassfish.api.invocation.ResourceHandler
- Direct Known Subclasses:
SessionContextImpl,SingletonContextImpl
public abstract class AbstractSessionContextImpl extends EJBContextImpl implements jakarta.ejb.SessionContext
Implementation of EJBContext for SessionBeans- Author:
- Mahesh Kannan
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.ejb.containers.EJBContextImpl
EJBContextImpl.BeanState
-
-
Field Summary
Fields Modifier and Type Field Description protected StringejbNameprotected ObjectinstanceKey-
Fields inherited from class com.sun.ejb.containers.EJBContextImpl
container, ejbLocalBusinessObjectImpl, ejbLocalObjectImpl, ejbObjectImpl, ejbRemoteBusinessObjectImpl, ejbStub, inEjbRemove, initialContext, isLocalInterfaceSupported, isRemoteInterfaceSupported, jcdiInjectionContext, optionalEjbLocalBusinessObjectImpl, state, transaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSessionContextImpl(Object ejb, BaseContainer container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckAccessToCallerSecurity()Overridden in containers that allow access to isCallerInRole() and getCallerPrincipal()voidcheckTimerServiceMethodAccess()The EJB spec makes a distinction between access to the TimerService object itself (via EJBContext.getTimerService) and access to the methods on TimerService, Timer, and TimerHandle.<T> TgetBusinessObject(Class<T> businessInterface)protected org.glassfish.api.invocation.ComponentInvocationgetCurrentComponentInvocation()ObjectgetInstanceKey()ClassgetInvokedBusinessInterface()jakarta.ejb.TimerServicegetTimerService()jakarta.transaction.UserTransactiongetUserTransaction()voidsetInstanceKey(Object instanceKey)StringtoString()booleanwasCancelCalled()-
Methods inherited from class com.sun.ejb.containers.EJBContextImpl
checkActivatePassivate, decrementConcurrentInvokeCount, doGetSetRollbackTxAttrCheck, getCallerIdentity, getCallerPrincipal, getConcurrentInvokeCount, getContainer, getContextData, getEJB, getEJBHome, getEJBLocalHome, getEJBLocalObject, getEJBObject, getEnvironment, getInterceptorInstances, getKey, getLastTimeUsed, getResourceList, getRollbackOnly, getState, getTransaction, inActivatePassivate, inActivatePassivate, incrementConcurrentInvokeCount, isCallerInRole, isCallerInRole, lookup, registerResource, setRollbackOnly, setTransaction, touch, unregisterResource
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
AbstractSessionContextImpl
protected AbstractSessionContextImpl(Object ejb, BaseContainer container)
-
-
Method Detail
-
getInstanceKey
public Object getInstanceKey()
-
setInstanceKey
public void setInstanceKey(Object instanceKey)
-
getTimerService
public jakarta.ejb.TimerService getTimerService() throws IllegalStateException- Specified by:
getTimerServicein interfacejakarta.ejb.EJBContext- Throws:
IllegalStateException
-
getUserTransaction
public jakarta.transaction.UserTransaction getUserTransaction() throws IllegalStateException- Specified by:
getUserTransactionin interfacejakarta.ejb.EJBContext- Overrides:
getUserTransactionin classEJBContextImpl- Throws:
IllegalStateException
-
getBusinessObject
public <T> T getBusinessObject(Class<T> businessInterface) throws IllegalStateException
- Specified by:
getBusinessObjectin interfacejakarta.ejb.SessionContext- Throws:
IllegalStateException
-
getInvokedBusinessInterface
public Class getInvokedBusinessInterface() throws IllegalStateException
- Specified by:
getInvokedBusinessInterfacein interfacejakarta.ejb.SessionContext- Throws:
IllegalStateException
-
wasCancelCalled
public boolean wasCancelCalled()
- Specified by:
wasCancelCalledin interfacejakarta.ejb.SessionContext
-
checkAccessToCallerSecurity
protected void checkAccessToCallerSecurity() throws IllegalStateExceptionDescription copied from class:EJBContextImplOverridden in containers that allow access to isCallerInRole() and getCallerPrincipal()- Overrides:
checkAccessToCallerSecurityin classEJBContextImpl- Throws:
IllegalStateException
-
checkTimerServiceMethodAccess
public void checkTimerServiceMethodAccess() throws IllegalStateExceptionDescription copied from class:EJBContextImplThe EJB spec makes a distinction between access to the TimerService object itself (via EJBContext.getTimerService) and access to the methods on TimerService, Timer, and TimerHandle. The latter case is covered by this check. It is overridden in the applicable concrete context impl subclasses.- Specified by:
checkTimerServiceMethodAccessin interfaceComponentContext- Overrides:
checkTimerServiceMethodAccessin classEJBContextImpl- Throws:
IllegalStateException
-
getCurrentComponentInvocation
protected org.glassfish.api.invocation.ComponentInvocation getCurrentComponentInvocation()
-
-