|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openejb.core.stateful.StatefulInstanceManager
Inner Class Summary | |
(package private) class |
StatefulInstanceManager.BeanEntryQue
INNER CLASSS |
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 |
org.apache.log4j.Category |
logger
|
protected 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)
|
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.EnterpriseBean |
obtainInstance(java.lang.Object primaryKey)
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 |
|
Field Detail |
protected long timeOUT
protected java.util.Hashtable beanINDEX
protected StatefulInstanceManager.BeanEntryQue lruQUE
protected PassivationStrategy passivator
protected int BULK_PASSIVATION_SIZE
protected SafeToolkit toolkit
public org.apache.log4j.Category 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 runOpenEJBException
- 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 instanceOpenEJBException
- if there is a problem retrieving the ancillary state objectSessionKey
public 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 managerOpenEJBException
- if there is a problem setting the ancillary state objectSessionKey
public 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 classOpenEJBException
- if there is a problem initializing the bean classSessionKey
public 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 classOpenEJBException
- if there is a problem initializing the bean classSessionKey
public javax.ejb.EnterpriseBean obtainInstance(java.lang.Object primaryKey) throws OpenEJBException
primaryKey
- the unique key that can identify the instance to returnOpenEJBException
- if there is a problem retreiving the instance from the poolInvalidateReferenceException
- if the instance has timed outSessionKey
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 classOpenEJBException
- if there is a problem adding the instance to the poolSessionKey
public javax.ejb.EnterpriseBean freeInstance(java.lang.Object primaryKey) throws SystemException
primaryKey
- the unique key that can identify the instance to be freedOpenEJBException
- if there is a problem removing the bean instance from the poolSystemException
- Sessionkey
protected void passivate() throws SystemException
SystemException
- protected BeanEntry activate(java.lang.Object primaryKey) throws 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
protected void markTxRollbackOnly(javax.transaction.Transaction tx) throws SystemException
protected javax.transaction.TransactionManager getTxMngr()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |