Package com.sun.ejb.containers
Class SessionContextImpl
java.lang.Object
com.sun.ejb.containers.EJBContextImpl
com.sun.ejb.containers.AbstractSessionContextImpl
com.sun.ejb.containers.SessionContextImpl
- All Implemented Interfaces:
ComponentContext,StatefulEJBContext,jakarta.ejb.EJBContext,jakarta.ejb.SessionContext,Serializable,org.glassfish.api.invocation.ResourceHandler
public final class SessionContextImpl
extends AbstractSessionContextImpl
implements StatefulEJBContext
Implementation of EJBContext for SessionBeans
- Author:
- Mahesh Kannan
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.ejb.containers.EJBContextImpl
EJBContextImpl.BeanState -
Field Summary
Fields inherited from class com.sun.ejb.containers.AbstractSessionContextImpl
ejbName, instanceKeyFields inherited from class com.sun.ejb.containers.EJBContextImpl
cdiInjectionContext, container, ejbLocalBusinessObjectImpl, ejbLocalObjectImpl, ejbObjectImpl, ejbRemoteBusinessObjectImpl, ejbStub, inEjbRemove, initialContext, isLocalInterfaceSupported, isRemoteInterfaceSupported, optionalEjbLocalBusinessObjectImpl, state, transaction -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtendedEntityManagerMapping(jakarta.persistence.EntityManagerFactory emf, com.sun.ejb.containers.StatefulSessionContainer.EEMRefInfo refInfo) booleanprotected voidOverridden in containers that allow access to isCallerInRole() and getCallerPrincipal()voidThe 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.final voidbooleancom.sun.enterprise.container.common.impl.PhysicalEntityManagerWrappergetExtendedEntityManager(jakarta.persistence.EntityManagerFactory emf) Map<jakarta.persistence.EntityManagerFactory, com.sun.enterprise.container.common.impl.PhysicalEntityManagerWrapper> Collection<com.sun.enterprise.container.common.impl.PhysicalEntityManagerWrapper> longfinal intjakarta.ejb.SessionContextjakarta.ejb.TimerServicelongbooleanlongfinal voidvoidbooleanisEmfRegisteredWithTx(jakarta.persistence.EntityManagerFactory emf) voidsetEmfRegisteredWithTx(jakarta.persistence.EntityManagerFactory emf, boolean flag) voidsetExistsInStore(boolean val) voidvoidsetVersion(long newVersion) Methods inherited from class com.sun.ejb.containers.AbstractSessionContextImpl
getBusinessObject, getCurrentComponentInvocation, getInstanceKey, getInvokedBusinessInterface, getUserTransaction, setInstanceKey, toString, wasCancelCalledMethods 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, lookup, registerResource, setRollbackOnly, setTransaction, touch, unregisterResourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.ejb.EJBContext
getCallerPrincipal, getContextData, getEJBHome, getEJBLocalHome, getRollbackOnly, isCallerInRole, lookup, setRollbackOnlyMethods inherited from interface jakarta.ejb.SessionContext
getEJBLocalObject, getEJBObject
-
Method Details
-
getExtendedEntityManagerMap
public Map<jakarta.persistence.EntityManagerFactory,com.sun.enterprise.container.common.impl.PhysicalEntityManagerWrapper> getExtendedEntityManagerMap() -
addExtendedEntityManagerMapping
public void addExtendedEntityManagerMapping(jakarta.persistence.EntityManagerFactory emf, com.sun.ejb.containers.StatefulSessionContainer.EEMRefInfo refInfo) -
getExtendedEntityManager
public com.sun.enterprise.container.common.impl.PhysicalEntityManagerWrapper getExtendedEntityManager(jakarta.persistence.EntityManagerFactory emf) -
getExtendedEntityManagers
public Collection<com.sun.enterprise.container.common.impl.PhysicalEntityManagerWrapper> getExtendedEntityManagers() -
setEmfRegisteredWithTx
public void setEmfRegisteredWithTx(jakarta.persistence.EntityManagerFactory emf, boolean flag) -
isEmfRegisteredWithTx
public boolean isEmfRegisteredWithTx(jakarta.persistence.EntityManagerFactory emf) -
initializeStatefulWriteLock
public void initializeStatefulWriteLock() -
getStatefulWriteLock
-
setStatefulWriteLock
-
getTimerService
- Specified by:
getTimerServicein interfacejakarta.ejb.EJBContext- Overrides:
getTimerServicein classAbstractSessionContextImpl- Throws:
IllegalStateException
-
checkAccessToCallerSecurity
Description copied from class:EJBContextImplOverridden in containers that allow access to isCallerInRole() and getCallerPrincipal()- Overrides:
checkAccessToCallerSecurityin classAbstractSessionContextImpl- Throws:
IllegalStateException
-
checkTimerServiceMethodAccess
Description 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 classAbstractSessionContextImpl- Throws:
IllegalStateException
-
getVersion
public long getVersion()- Specified by:
getVersionin interfaceStatefulEJBContext
-
incrementAndGetVersion
public long incrementAndGetVersion()- Specified by:
incrementAndGetVersionin interfaceStatefulEJBContext
-
setVersion
public void setVersion(long newVersion) - Specified by:
setVersionin interfaceStatefulEJBContext
-
getLastAccessTime
public long getLastAccessTime()- Specified by:
getLastAccessTimein interfaceStatefulEJBContext
-
canBePassivated
public boolean canBePassivated()- Specified by:
canBePassivatedin interfaceStatefulEJBContext
-
hasExtendedPC
public boolean hasExtendedPC() -
getSessionContext
public jakarta.ejb.SessionContext getSessionContext()- Specified by:
getSessionContextin interfaceStatefulEJBContext
-
existsInStore
public boolean existsInStore()- Specified by:
existsInStorein interfaceStatefulEJBContext
-
setExistsInStore
public void setExistsInStore(boolean val) - Specified by:
setExistsInStorein interfaceStatefulEJBContext
-
incrementRefCount
public final void incrementRefCount() -
decrementRefCount
public final void decrementRefCount() -
getRefCount
public final int getRefCount()
-