public class StatefulSessionComponent extends SessionBeanComponent implements StatefulObjectFactory<StatefulSessionComponentInstance>, PassivationListener<StatefulSessionComponentInstance>, IdentifierFactory<org.jboss.ejb.client.SessionID>
Modifier and Type | Field and Description |
---|---|
static Object |
SESSION_ID_REFERENCE_KEY |
beanLevelAccessTimeout
Modifier | Constructor and Description |
---|---|
protected |
StatefulSessionComponent(StatefulSessionComponentCreateService ejbComponentCreateService)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected StatefulSessionComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct)
Construct the component instance.
|
protected StatefulSessionComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct,
Map<Object,Object> context)
Construct the component instance.
|
org.jboss.ejb.client.SessionID |
createIdentifier() |
StatefulSessionComponentInstance |
createInstance()
Create a new instance of this component.
|
StatefulSessionComponentInstance |
createInstance(Object instance)
Wraps an existing object instance in a ComponentInstance, and run the post construct interceptor chain on it.
|
protected void |
createInterceptors(org.jboss.invocation.InterceptorFactoryContext context) |
org.jboss.ejb.client.SessionID |
createSession() |
void |
destroyInstance(StatefulSessionComponentInstance instance)
Destroy an instance of the component.
|
AccessTimeoutDetails |
getAccessTimeout(Method method)
Returns the
AccessTimeout applicable to given method |
org.jboss.invocation.Interceptor |
getAfterBegin() |
Method |
getAfterBeginMethod() |
org.jboss.invocation.Interceptor |
getAfterCompletion() |
Method |
getAfterCompletionMethod() |
AllowedMethodsInformation |
getAllowedMethodsInformation() |
org.jboss.invocation.Interceptor |
getBeforeCompletion() |
Method |
getBeforeCompletionMethod() |
<T> T |
getBusinessObject(Class<T> businessInterface,
org.jboss.invocation.InterceptorContext context) |
Cache<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance> |
getCache() |
org.jboss.invocation.Interceptor |
getEjb2XRemoveMethod() |
javax.ejb.EJBLocalObject |
getEJBLocalObject(org.jboss.invocation.InterceptorContext ctx) |
javax.ejb.EJBObject |
getEJBObject(org.jboss.invocation.InterceptorContext ctx) |
org.jboss.invocation.Interceptor |
getPostActivate() |
org.jboss.invocation.Interceptor |
getPrePassivate() |
Set<Object> |
getSerialiableInterceptorContextKeys() |
protected org.jboss.ejb.client.SessionID |
getSessionIdOf(org.jboss.invocation.InterceptorContext ctx) |
javax.ejb.TimerService |
getTimerService() |
protected BasicComponentInstance |
instantiateComponentInstance(org.jboss.invocation.Interceptor preDestroyInterceptor,
Map<Method,org.jboss.invocation.Interceptor> methodInterceptors,
Map<Object,Object> context)
Responsible for instantiating the
BasicComponentInstance . |
void |
postActivate(StatefulSessionComponentInstance instance) |
void |
prePassivate(StatefulSessionComponentInstance instance) |
void |
removeSession(org.jboss.ejb.client.SessionID sessionId)
Removes the session associated with the
sessionId . |
void |
start()
Start operation called when the Component is available.
|
void |
stop()
Stop operation called when the Component is no longer available.
|
getAsynchronousExecutor, getRollbackOnly, setRollbackOnly
createViewInstanceProxy, createViewInstanceProxy, getApplicationException, getApplicationName, getCallerPrincipal, getCurrentTransactionAttribute, getDistinctName, getEarApplicationName, getEJBHome, getEjbHomeViewServiceName, getEJBLocalHome, getEjbLocalHomeViewServiceName, getEjbLocalObjectType, getEjbLocalObjectViewServiceName, getEjbObjectType, getEjbObjectViewServiceName, getEjbRemoteTransactionsRepository, getInvocationMetrics, getModuleName, getSecurityManager, getSecurityMetaData, getShutDownInterceptorFactory, getTimeoutInterceptors, getTimeoutMethod, getTransactionAttributeType, getTransactionAttributeType, getTransactionManager, getTransactionSynchronizationRegistry, getTransactionTimeout, getTransactionTimeout, getUserTransaction, isBeanManagedTransaction, isCallerInRole, isStatisticsEnabled, lookup
componentInstanceCreated, getComponentClass, getComponentName, getCreateServiceName, getNamespaceContextSelector, serviceNameOf, toString, waitForComponentStart
public static final Object SESSION_ID_REFERENCE_KEY
protected StatefulSessionComponent(StatefulSessionComponentCreateService ejbComponentCreateService)
ejbComponentCreateService
- the component configurationpublic StatefulSessionComponentInstance createInstance()
BasicComponent
createInstance
in interface Component
createInstance
in interface StatefulObjectFactory<StatefulSessionComponentInstance>
createInstance
in class BasicComponent
public StatefulSessionComponentInstance createInstance(Object instance)
BasicComponent
createInstance
in interface Component
createInstance
in class BasicComponent
instance
- The instance to wrapprotected StatefulSessionComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct)
BasicComponent
constructComponentInstance
in class BasicComponent
instance
- An instance to be wrapped, or null if a new instance should be createdprotected StatefulSessionComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, Map<Object,Object> context)
BasicComponent
constructComponentInstance
in class BasicComponent
instance
- An instance to be wrapped, or null if a new instance should be createdpublic void destroyInstance(StatefulSessionComponentInstance instance)
StatefulObjectFactory
destroyInstance
in interface StatefulObjectFactory<StatefulSessionComponentInstance>
instance
- the instance to destroypublic void postActivate(StatefulSessionComponentInstance instance)
postActivate
in interface PassivationListener<StatefulSessionComponentInstance>
public void prePassivate(StatefulSessionComponentInstance instance)
prePassivate
in interface PassivationListener<StatefulSessionComponentInstance>
protected org.jboss.ejb.client.SessionID getSessionIdOf(org.jboss.invocation.InterceptorContext ctx)
public <T> T getBusinessObject(Class<T> businessInterface, org.jboss.invocation.InterceptorContext context) throws IllegalStateException
getBusinessObject
in class SessionBeanComponent
IllegalStateException
public javax.ejb.EJBLocalObject getEJBLocalObject(org.jboss.invocation.InterceptorContext ctx) throws IllegalStateException
getEJBLocalObject
in class SessionBeanComponent
IllegalStateException
public javax.ejb.EJBObject getEJBObject(org.jboss.invocation.InterceptorContext ctx) throws IllegalStateException
getEJBObject
in class SessionBeanComponent
IllegalStateException
public javax.ejb.TimerService getTimerService() throws IllegalStateException
getTimerService
in class EJBComponent
IllegalStateException
public AccessTimeoutDetails getAccessTimeout(Method method)
AccessTimeout
applicable to given methodpublic org.jboss.ejb.client.SessionID createSession()
public Cache<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance> getCache()
public org.jboss.ejb.client.SessionID createIdentifier()
createIdentifier
in interface IdentifierFactory<org.jboss.ejb.client.SessionID>
protected BasicComponentInstance instantiateComponentInstance(org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors, Map<Object,Object> context)
BasicComponent
BasicComponentInstance
. This method is *not* responsible for
handling the post construct activities like injection and lifecycle invocation. That is handled by
BasicComponent.constructComponentInstance(org.jboss.as.naming.ManagedReference, boolean)
.
instantiateComponentInstance
in class BasicComponent
public void removeSession(org.jboss.ejb.client.SessionID sessionId)
sessionId
.sessionId
- The session idpublic org.jboss.invocation.Interceptor getAfterBegin()
public org.jboss.invocation.Interceptor getAfterCompletion()
public org.jboss.invocation.Interceptor getBeforeCompletion()
public Method getAfterBeginMethod()
public Method getAfterCompletionMethod()
public Method getBeforeCompletionMethod()
public org.jboss.invocation.Interceptor getPrePassivate()
public org.jboss.invocation.Interceptor getPostActivate()
public org.jboss.invocation.Interceptor getEjb2XRemoveMethod()
public void start()
BasicComponent
start
in interface Component
start
in class EJBComponent
protected void createInterceptors(org.jboss.invocation.InterceptorFactoryContext context)
createInterceptors
in class BasicComponent
public void stop()
BasicComponent
stop
in interface Component
stop
in class EJBComponent
public AllowedMethodsInformation getAllowedMethodsInformation()
getAllowedMethodsInformation
in class EJBComponent
Copyright © 2015 JBoss by Red Hat. All rights reserved.