|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.ejb3.BaseContext<T>
org.jboss.ejb3.session.SessionBeanContext<T>
org.jboss.ejb3.session.SessionSpecBeanContext<StatefulContainer>
org.jboss.ejb3.stateful.StatefulBeanContext
public class StatefulBeanContext
BeanContext for a stateful session bean. Either bean or beanMO are always filled.
| Field Summary | |
|---|---|
protected org.jboss.serial.io.MarshalledObject |
beanMO
|
protected StatefulBeanContext |
containedIn
|
protected java.lang.String |
containerClusterUid
|
protected java.lang.String |
containerGuid
|
protected java.util.List<StatefulBeanContext> |
contains
|
static ThreadLocalStack<StatefulBeanContext> |
currentBean
|
protected boolean |
discarded
|
protected java.lang.Object |
id
|
protected boolean |
inInvocation
|
protected boolean |
isClustered
|
long |
lastUsed
|
protected java.util.concurrent.locks.ReentrantLock |
lock
|
boolean |
markedForPassivation
|
boolean |
markedForReplication
|
protected boolean |
passivated
|
protected java.util.HashMap<java.lang.String,javax.persistence.EntityManager> |
persistenceContexts
|
static ThreadLocalStack<StatefulBeanContext> |
propagatedContainedIn
|
protected boolean |
removed
|
protected boolean |
replicationIsPassivation
|
protected boolean |
txSynchronized
|
| Fields inherited from class org.jboss.ejb3.session.SessionBeanContext |
|---|
ejbContext |
| Fields inherited from class org.jboss.ejb3.BaseContext |
|---|
bean, container, interceptorInstances, log, metadata, rm |
| Constructor Summary | |
|---|---|
|
StatefulBeanContext()
Deprecated. |
protected |
StatefulBeanContext(StatefulContainer container,
org.jboss.serial.io.MarshalledObject beanMO)
An incoming context from serialization. |
protected |
StatefulBeanContext(StatefulContainer container,
java.lang.Object bean)
A brand new stateful session bean. |
| Method Summary | |
|---|---|
void |
activateAfterReplication()
|
void |
addContains(StatefulBeanContext ctx)
|
void |
addExtendedPersistenceContext(java.lang.String id,
javax.persistence.EntityManager pc)
|
protected void |
discard()
|
boolean |
equals(java.lang.Object obj)
|
protected void |
extractBeanAndInterceptors()
|
boolean |
getCanPassivate()
Checks whether this context or any of its children are in use. |
boolean |
getCanRemoveFromCache()
|
StatefulBeanContext |
getContainedIn()
|
StatefulContainer |
getContainer()
|
java.util.List<StatefulBeanContext> |
getContains()
|
org.jboss.ejb3.context.spi.EJBContext |
getEJBContext()
|
javax.persistence.EntityManager |
getExtendedPersistenceContext(java.lang.String id)
|
java.util.Map<java.lang.String,javax.persistence.EntityManager> |
getExtendedPersistenceContexts()
|
java.lang.Object |
getId()
|
java.lang.Object |
getInstance()
Returns the enterprise bean, never returns null. |
java.lang.Object[] |
getInterceptorInstances(InterceptorInfo[] interceptorInfos)
|
java.lang.Object |
getInvokedMethodKey()
|
java.util.concurrent.locks.ReentrantLock |
getLock()
|
org.jboss.aop.metadata.SimpleMetaData |
getMetaData()
|
boolean |
getReplicationIsPassivation()
|
protected javax.ejb.SessionSynchronization |
getSessionSynchronization()
|
StatefulBeanContext |
getUltimateContainedIn()
|
int |
hashCode()
|
boolean |
isDiscarded()
|
boolean |
isInInvocation()
|
boolean |
isInUse()
|
boolean |
isModified()
|
boolean |
isRemoved()
|
boolean |
isTxSynchronized()
|
void |
passivateAfterReplication()
Notification from a ClusteredStatefulCache to inform that a bean that is stored in the distributed cache is now being passivated as well. |
void |
popContainedIn()
|
void |
postActivate()
Notification from a non-clustered StatefulCache to inform that we have been activated. |
void |
postReplicate()
Notification from a ClusteredStatefulCache after the bean is fetched from the distributed cache. |
void |
prePassivate()
Notification from a non-clustered StatefulCache to inform that we are about to be passivated. |
void |
preReplicate()
Notification from a ClusteredStatefulCache before a bean is replicated. |
StatefulBeanContext |
pushContainedIn()
|
void |
readExternal(java.io.ObjectInput in)
|
protected void |
registerSynchronization(javax.transaction.Transaction tx,
javax.transaction.Synchronization sync)
To make sure Synchronizations are executed in a given order we maintain a sync registry within this object. |
void |
remove()
|
void |
removeContains(StatefulBeanContext ctx)
|
void |
removeExtendedPersistenceContext(java.lang.String id)
|
boolean |
scanForExtendedPersistenceContext(java.lang.String id,
StatefulBeanContext ignore)
|
void |
setDiscarded(boolean discarded)
|
void |
setInInvocation(boolean inInvocation)
|
void |
setInUse(boolean inUse)
|
void |
setReplicationIsPassivation(boolean replicationIsPassivation)
|
void |
setTxSynchronized(boolean txSynchronized)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.jboss.ejb3.session.SessionSpecBeanContext |
|---|
createInjectionInvocation, createLifecycleInvocation |
| Methods inherited from class org.jboss.ejb3.BaseContext |
|---|
getInterceptor, initialiseInterceptorInstances |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.ejb3.interceptors.container.BeanContext |
|---|
getInterceptor |
| Field Detail |
|---|
protected java.lang.Object id
protected boolean txSynchronized
protected boolean inInvocation
protected org.jboss.serial.io.MarshalledObject beanMO
protected java.util.concurrent.locks.ReentrantLock lock
protected boolean discarded
public static ThreadLocalStack<StatefulBeanContext> propagatedContainedIn
public static ThreadLocalStack<StatefulBeanContext> currentBean
protected StatefulBeanContext containedIn
protected java.util.List<StatefulBeanContext> contains
protected java.util.HashMap<java.lang.String,javax.persistence.EntityManager> persistenceContexts
protected boolean removed
protected java.lang.String containerClusterUid
protected java.lang.String containerGuid
protected boolean isClustered
protected boolean replicationIsPassivation
protected transient boolean passivated
public volatile boolean markedForPassivation
public volatile boolean markedForReplication
public long lastUsed
| Constructor Detail |
|---|
protected StatefulBeanContext(StatefulContainer container,
org.jboss.serial.io.MarshalledObject beanMO)
container - beanMO -
protected StatefulBeanContext(StatefulContainer container,
java.lang.Object bean)
container - bean - public StatefulBeanContext()
| Method Detail |
|---|
protected void discard()
public java.util.List<StatefulBeanContext> getContains()
protected javax.ejb.SessionSynchronization getSessionSynchronization()
public org.jboss.ejb3.context.spi.EJBContext getEJBContext()
getEJBContext in class SessionBeanContext<StatefulContainer>public javax.persistence.EntityManager getExtendedPersistenceContext(java.lang.String id)
public void addExtendedPersistenceContext(java.lang.String id,
javax.persistence.EntityManager pc)
public boolean scanForExtendedPersistenceContext(java.lang.String id,
StatefulBeanContext ignore)
public void removeExtendedPersistenceContext(java.lang.String id)
public java.util.Map<java.lang.String,javax.persistence.EntityManager> getExtendedPersistenceContexts()
public StatefulBeanContext getContainedIn()
public StatefulBeanContext getUltimateContainedIn()
public void addContains(StatefulBeanContext ctx)
public void removeContains(StatefulBeanContext ctx)
public StatefulBeanContext pushContainedIn()
public boolean getCanPassivate()
public void prePassivate()
public void postActivate()
public void passivateAfterReplication()
public void activateAfterReplication()
public boolean getReplicationIsPassivation()
public void setReplicationIsPassivation(boolean replicationIsPassivation)
public void preReplicate()
public void postReplicate()
public void popContainedIn()
public boolean isInUse()
public void setInUse(boolean inUse)
public boolean isDiscarded()
public void setDiscarded(boolean discarded)
public java.util.concurrent.locks.ReentrantLock getLock()
public boolean isInInvocation()
public void setInInvocation(boolean inInvocation)
public java.lang.Object getId()
getId in interface org.jboss.ejb3.cache.IdentifiablegetId in class BaseContext<StatefulContainer>public boolean isTxSynchronized()
public void setTxSynchronized(boolean txSynchronized)
public boolean isRemoved()
public void remove()
public boolean getCanRemoveFromCache()
public StatefulContainer getContainer()
getContainer in class BaseContext<StatefulContainer>public java.lang.Object getInstance()
BaseContext
getInstance in interface org.jboss.ejb3.interceptors.container.BeanContext<java.lang.Object>getInstance in class BaseContext<StatefulContainer>public boolean isModified()
public org.jboss.aop.metadata.SimpleMetaData getMetaData()
getMetaData in interface org.jboss.ejb3.tx.container.StatefulBeanContext<java.lang.Object>getMetaData in class BaseContext<StatefulContainer>public java.lang.Object[] getInterceptorInstances(InterceptorInfo[] interceptorInfos)
getInterceptorInstances in class BaseContext<StatefulContainer>protected void extractBeanAndInterceptors()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic java.lang.Object getInvokedMethodKey()
getInvokedMethodKey in class BaseContext<StatefulContainer>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
protected void registerSynchronization(javax.transaction.Transaction tx,
javax.transaction.Synchronization sync)
throws java.lang.IllegalStateException,
javax.transaction.RollbackException,
javax.transaction.SystemException
sync -
java.lang.IllegalStateException
javax.transaction.RollbackException
javax.transaction.SystemException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||