org.apache.openejb.core.stateful
Class StatefulInstanceManager
java.lang.Object
org.apache.openejb.core.stateful.StatefulInstanceManager
public class StatefulInstanceManager
- extends Object
Method Summary |
protected BeanEntry |
activate(Object primaryKey)
|
Object |
activateInstance(ThreadContext callContext,
BeanEntry entry)
|
void |
deploy(CoreDeploymentInfo deploymentInfo,
Index<Method,StatefulContainer.MethodType> index)
|
protected InvalidateReferenceException |
destroy(ThreadContext callContext,
BeanEntry entry,
Exception t)
|
Object |
freeInstance(ThreadContext threadContext)
|
protected BeanEntry |
getBeanEntry(ThreadContext callContext)
|
protected Hashtable<Object,BeanEntry> |
getBeanIndex(ThreadContext threadContext)
|
Transaction |
getBeanTransaction(ThreadContext callContext)
|
Map<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager> |
getEntityManagers(ThreadContext callContext,
Index<javax.persistence.EntityManagerFactory,Map> factories)
|
protected void |
handleCallbackException(Throwable e,
Object instance,
ThreadContext callContext,
String callBack)
|
protected void |
handleTimeout(BeanEntry entry,
ThreadContext threadContext)
|
protected void |
markTxRollbackOnly(Transaction tx)
|
protected BeanEntry |
newBeanEntry(Object primaryKey,
Object bean)
|
Object |
newInstance(Object primaryKey,
Class beanClass)
|
protected StatefulInstanceManager.Instance |
newInstance(Object primaryKey,
Object bean,
Map<String,Object> interceptorInstances)
|
Object |
obtainInstance(Object primaryKey,
ThreadContext callContext)
|
protected void |
onFreeBeanEntry(ThreadContext threadContext,
BeanEntry entry)
|
protected void |
onPoolInstanceWithoutTransaction(ThreadContext callContext,
BeanEntry entry)
|
protected void |
passivate()
|
void |
passivate(ThreadContext threadContext,
BeanEntry currentEntry)
|
void |
poolInstance(ThreadContext callContext,
Object bean)
|
void |
setBeanTransaction(ThreadContext callContext,
Transaction beanTransaction)
|
void |
setEntityManagers(ThreadContext callContext,
Index<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager> entityManagers)
|
void |
undeploy(CoreDeploymentInfo deploymentInfo)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final Logger logger
timeOut
protected final long timeOut
StatefulInstanceManager
public StatefulInstanceManager(TransactionManager transactionManager,
SecurityService securityService,
JtaEntityManagerRegistry jtaEntityManagerRegistry,
Class passivatorClass,
int timeout,
int poolSize,
int bulkPassivate)
throws OpenEJBException
- Throws:
OpenEJBException
deploy
public void deploy(CoreDeploymentInfo deploymentInfo,
Index<Method,StatefulContainer.MethodType> index)
throws OpenEJBException
- Throws:
OpenEJBException
undeploy
public void undeploy(CoreDeploymentInfo deploymentInfo)
throws OpenEJBException
- Throws:
OpenEJBException
getBeanTransaction
public Transaction getBeanTransaction(ThreadContext callContext)
throws OpenEJBException
- Throws:
OpenEJBException
setBeanTransaction
public void setBeanTransaction(ThreadContext callContext,
Transaction beanTransaction)
throws OpenEJBException
- Throws:
OpenEJBException
getEntityManagers
public Map<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager> getEntityManagers(ThreadContext callContext,
Index<javax.persistence.EntityManagerFactory,Map> factories)
throws OpenEJBException
- Throws:
OpenEJBException
setEntityManagers
public void setEntityManagers(ThreadContext callContext,
Index<javax.persistence.EntityManagerFactory,javax.persistence.EntityManager> entityManagers)
throws OpenEJBException
- Throws:
OpenEJBException
newInstance
public Object newInstance(Object primaryKey,
Class beanClass)
throws OpenEJBException
- Throws:
OpenEJBException
newInstance
protected StatefulInstanceManager.Instance newInstance(Object primaryKey,
Object bean,
Map<String,Object> interceptorInstances)
newBeanEntry
protected BeanEntry newBeanEntry(Object primaryKey,
Object bean)
obtainInstance
public Object obtainInstance(Object primaryKey,
ThreadContext callContext)
throws OpenEJBException
- Throws:
OpenEJBException
activateInstance
public Object activateInstance(ThreadContext callContext,
BeanEntry entry)
throws SystemException,
ApplicationException
- Throws:
SystemException
ApplicationException
handleTimeout
protected void handleTimeout(BeanEntry entry,
ThreadContext threadContext)
poolInstance
public void poolInstance(ThreadContext callContext,
Object bean)
throws OpenEJBException
- Throws:
OpenEJBException
onPoolInstanceWithoutTransaction
protected void onPoolInstanceWithoutTransaction(ThreadContext callContext,
BeanEntry entry)
freeInstance
public Object freeInstance(ThreadContext threadContext)
throws SystemException
- Throws:
SystemException
onFreeBeanEntry
protected void onFreeBeanEntry(ThreadContext threadContext,
BeanEntry entry)
passivate
protected void passivate()
throws SystemException
- Throws:
SystemException
passivate
public void passivate(ThreadContext threadContext,
BeanEntry currentEntry)
activate
protected BeanEntry activate(Object primaryKey)
throws SystemException
- Throws:
SystemException
destroy
protected InvalidateReferenceException destroy(ThreadContext callContext,
BeanEntry entry,
Exception t)
throws SystemException
- Throws:
SystemException
getBeanEntry
protected BeanEntry getBeanEntry(ThreadContext callContext)
throws OpenEJBException
- Throws:
OpenEJBException
getBeanIndex
protected Hashtable<Object,BeanEntry> getBeanIndex(ThreadContext threadContext)
handleCallbackException
protected void handleCallbackException(Throwable e,
Object instance,
ThreadContext callContext,
String callBack)
throws ApplicationException,
SystemException
- Throws:
ApplicationException
SystemException
markTxRollbackOnly
protected void markTxRollbackOnly(Transaction tx)
throws SystemException
- Throws:
SystemException
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.