|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.core.stateful.StatefulInstanceManager
public class StatefulInstanceManager
Field Summary | |
---|---|
protected java.util.Hashtable |
beanINDEX
This index keeps track of all beans that are not passivated. |
protected int |
BULK_PASSIVATION_SIZE
Timeout Manager |
Logger |
logger
|
protected org.openejb.core.stateful.StatefulInstanceManager.BeanEntryQue |
lruQUE
This colleciton keeps track of all beans that are in the method ready pool and are not passivated. |
protected PassivationStrategy |
passivator
The passivator is responsible for writing beans to disk at passivation time. |
protected long |
timeOUT
Represents the time-out period for a stateful bean instance in milliseconds. |
protected SafeToolkit |
toolkit
|
Constructor Summary | |
---|---|
StatefulInstanceManager()
CONSTRUCTOR METHODS |
Method Summary | |
---|---|
protected BeanEntry |
activate(java.lang.Object primaryKey)
|
protected InvalidateReferenceException |
destroy(BeanEntry entry,
java.lang.Exception t)
|
javax.ejb.EnterpriseBean |
freeInstance(java.lang.Object primaryKey)
Permanently removes the bean instance with the specified primaryKey from this instance manager's pool. |
java.lang.Object |
getAncillaryState(java.lang.Object primaryKey)
Gets the ancillary state object of the instance with the specified primaryKey. |
protected BeanEntry |
getBeanEntry(java.lang.Object primaryKey)
Used by get/setAncillaryState( ) methods |
protected javax.transaction.TransactionManager |
getTxMngr()
|
protected void |
handleCallbackException(java.lang.Throwable e,
javax.ejb.EnterpriseBean instance,
ThreadContext callContext,
java.lang.String callBack)
|
protected void |
handleTimeout(BeanEntry entry,
ThreadContext thrdCntx)
|
void |
init(java.util.Properties props)
Fully instaniates this instance manager and assigns it to the specified ContainerManager. |
protected void |
markTxRollbackOnly(javax.transaction.Transaction tx)
|
javax.ejb.EnterpriseBean |
newInstance(java.lang.Object primaryKey,
java.lang.Class beanClass)
Instantiates and returns an new instance of the specified bean class. |
javax.ejb.EnterpriseBean |
newInstance(java.lang.Object primaryKey,
java.lang.Object ancillaryState,
java.lang.Class beanClass)
Instantiates and returns an new instance of the specified bean class. |
javax.ejb.SessionBean |
obtainInstance(java.lang.Object primaryKey,
ThreadContext callContext)
Gets a previously instantiated instance of the bean class with the specified primaryKey |
protected void |
passivate()
PASSIVATION |
void |
poolInstance(java.lang.Object primaryKey,
javax.ejb.EnterpriseBean bean)
Hands an instance of the bean class over to this instance manager to be managed until the instace is needed again. |
void |
setAncillaryState(java.lang.Object primaryKey,
java.lang.Object ancillaryState)
Sets the ancillary state of the bean instance with the specified primaryKey Setting the ancillary state after modifing it is not necessary, because getAncillary state returns an object reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long timeOUT
protected java.util.Hashtable beanINDEX
protected org.openejb.core.stateful.StatefulInstanceManager.BeanEntryQue lruQUE
protected PassivationStrategy passivator
protected int BULK_PASSIVATION_SIZE
protected SafeToolkit toolkit
public Logger logger
Constructor Detail |
---|
public StatefulInstanceManager()
Method Detail |
---|
public void init(java.util.Properties props) throws OpenEJBException
props
- the properties the instance manager needs to fully initialize and run
OpenEJBException
- if there is a problem initializing this instance managerpublic java.lang.Object getAncillaryState(java.lang.Object primaryKey) throws OpenEJBException
primaryKey
- the primary key of the bean instance
OpenEJBException
- if there is a problem retrieving the ancillary state objectpublic void setAncillaryState(java.lang.Object primaryKey, java.lang.Object ancillaryState) throws OpenEJBException
primaryKey
- the unique key that can identify the instance being managedancillaryState
- the new ancillary state of the bean instance in this instance manager
OpenEJBException
- if there is a problem setting the ancillary state objectpublic javax.ejb.EnterpriseBean newInstance(java.lang.Object primaryKey, java.lang.Class beanClass) throws OpenEJBException
primaryKey
- the unique key that can identify the instance being managedbeanClass
- the type of the bean's class
OpenEJBException
- if there is a problem initializing the bean classpublic javax.ejb.EnterpriseBean newInstance(java.lang.Object primaryKey, java.lang.Object ancillaryState, java.lang.Class beanClass) throws OpenEJBException
primaryKey
- the unique key that can identify the instance being managedancillaryState
- the ancillary state of the bean instance in this instance managerbeanClass
- the type of the bean's class
OpenEJBException
- if there is a problem initializing the bean classpublic javax.ejb.SessionBean obtainInstance(java.lang.Object primaryKey, ThreadContext callContext) throws OpenEJBException
primaryKey
- the unique key that can identify the instance to return
OpenEJBException
- if there is a problem retreiving the instance from the pool
InvalidateReferenceException
- if the instance has timed outprotected void handleTimeout(BeanEntry entry, ThreadContext thrdCntx)
public void poolInstance(java.lang.Object primaryKey, javax.ejb.EnterpriseBean bean) throws OpenEJBException
primaryKey
- the unique key that can identify the instance being managedbean
- an instance of the bean class
OpenEJBException
- if there is a problem adding the instance to the poolpublic javax.ejb.EnterpriseBean freeInstance(java.lang.Object primaryKey) throws SystemException
primaryKey
- the unique key that can identify the instance to be freed
SystemException
- if there is a problem removing the bean instance from the pool
SystemException
protected void passivate() throws SystemException
SystemException
protected BeanEntry activate(java.lang.Object primaryKey) throws SystemException
SystemException
protected InvalidateReferenceException destroy(BeanEntry entry, java.lang.Exception t) throws SystemException
entry
- t
-
SystemException
protected BeanEntry getBeanEntry(java.lang.Object primaryKey) throws OpenEJBException
primaryKey
-
OpenEJBException
protected void handleCallbackException(java.lang.Throwable e, javax.ejb.EnterpriseBean instance, ThreadContext callContext, java.lang.String callBack) throws ApplicationException, SystemException
ApplicationException
SystemException
protected void markTxRollbackOnly(javax.transaction.Transaction tx) throws SystemException
SystemException
protected javax.transaction.TransactionManager getTxMngr()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |