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, java.io.Serializable, EJBContext, SessionContext, ResourceHandler
public final class SessionContextImpl
- extends AbstractSessionContextImpl
- implements StatefulEJBContext
Implementation of EJBContext for SessionBeans
- Author:
- Mahesh Kannan
- See Also:
- Serialized Form
| Fields inherited from class com.sun.ejb.containers.EJBContextImpl |
container, ejbLocalBusinessObjectImpl, ejbLocalObjectImpl, ejbObjectImpl, ejbRemoteBusinessObjectImpl, ejbStub, inEjbRemove, isLocalInterfaceSupported, isRemoteInterfaceSupported, jcdiInjectionContext, optionalEjbLocalBusinessObjectImpl, state, transaction |
| Methods inherited from class com.sun.ejb.containers.EJBContextImpl |
checkActivatePassivate, decrementConcurrentInvokeCount, doGetSetRollbackTxAttrCheck, getCallerIdentity, getCallerPrincipal, getConcurrentInvokeCount, getContainer, getContextData, getEJB, getEJBHome, getEJBLocalHome, getEJBLocalObject, getEJBObject, getEnvironment, getInterceptorInstances, getLastTimeUsed, getResourceList, getRollbackOnly, getTransaction, inActivatePassivate, inActivatePassivate, incrementConcurrentInvokeCount, isCallerInRole, isCallerInRole, lookup, registerResource, setRollbackOnly, setTransaction, unregisterResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.ejb.EJBContext |
getCallerIdentity, getCallerPrincipal, getContextData, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, isCallerInRole, isCallerInRole, lookup, setRollbackOnly |
getExtendedEntityManagerMap
public java.util.Map<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager> getExtendedEntityManagerMap()
addExtendedEntityManagerMapping
public void addExtendedEntityManagerMapping(javax.persistence.EntityManagerFactory emf,
com.sun.ejb.containers.StatefulSessionContainer.EEMRefInfo refInfo)
getExtendedEntityManager
public javax.persistence.EntityManager getExtendedEntityManager(javax.persistence.EntityManagerFactory emf)
getExtendedEntityManagers
public java.util.Collection<javax.persistence.EntityManager> getExtendedEntityManagers()
setEmfRegisteredWithTx
public void setEmfRegisteredWithTx(javax.persistence.EntityManagerFactory emf,
boolean flag)
isEmfRegisteredWithTx
public boolean isEmfRegisteredWithTx(javax.persistence.EntityManagerFactory emf)
initializeStatefulWriteLock
public void initializeStatefulWriteLock()
getStatefulWriteLock
public java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock getStatefulWriteLock()
setStatefulWriteLock
public void setStatefulWriteLock(SessionContextImpl other)
getTimerService
public TimerService getTimerService()
throws java.lang.IllegalStateException
- Specified by:
getTimerService in interface EJBContext- Overrides:
getTimerService in class AbstractSessionContextImpl
- Throws:
java.lang.IllegalStateException
checkAccessToCallerSecurity
protected void checkAccessToCallerSecurity()
throws java.lang.IllegalStateException
- Description copied from class:
EJBContextImpl
- Overridden in containers that allow access to isCallerInRole() and
getCallerPrincipal()
- Overrides:
checkAccessToCallerSecurity in class AbstractSessionContextImpl
- Throws:
java.lang.IllegalStateException
checkTimerServiceMethodAccess
public void checkTimerServiceMethodAccess()
throws java.lang.IllegalStateException
- Description copied from class:
EJBContextImpl
- 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. The latter case
is covered by this check. It is overridden in the applicable concrete
context impl subclasses.
- Specified by:
checkTimerServiceMethodAccess in interface ComponentContext- Overrides:
checkTimerServiceMethodAccess in class AbstractSessionContextImpl
- Throws:
java.lang.IllegalStateException
getVersion
public long getVersion()
- Specified by:
getVersion in interface StatefulEJBContext
incrementAndGetVersion
public long incrementAndGetVersion()
- Specified by:
incrementAndGetVersion in interface StatefulEJBContext
setVersion
public void setVersion(long newVersion)
- Specified by:
setVersion in interface StatefulEJBContext
getLastAccessTime
public long getLastAccessTime()
- Specified by:
getLastAccessTime in interface StatefulEJBContext
canBePassivated
public boolean canBePassivated()
- Specified by:
canBePassivated in interface StatefulEJBContext
hasExtendedPC
public boolean hasExtendedPC()
getSessionContext
public SessionContext getSessionContext()
- Specified by:
getSessionContext in interface StatefulEJBContext
existsInStore
public boolean existsInStore()
- Specified by:
existsInStore in interface StatefulEJBContext
setExistsInStore
public void setExistsInStore(boolean val)
- Specified by:
setExistsInStore in interface StatefulEJBContext
incrementRefCount
public final void incrementRefCount()
decrementRefCount
public final void decrementRefCount()
getRefCount
public final int getRefCount()
Copyright © 2012 GlassFish Community. All Rights Reserved.