public class StatefulSessionComponent extends SessionBeanComponent implements StatefulObjectFactory<StatefulSessionComponentInstance>, PassivationManager<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance>
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 void |
componentInstanceCreated(BasicComponentInstance basicComponentInstance,
org.jboss.invocation.InterceptorFactoryContext context)
Method that can be overridden to perform setup on the instance after it has been created
|
protected StatefulSessionComponentInstance |
constructComponentInstance(ManagedReference instance,
boolean invokePostConstruct,
org.jboss.invocation.InterceptorFactoryContext context)
Construct the component instance.
|
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 org.jboss.invocation.Interceptor |
createInterceptor(org.jboss.invocation.InterceptorFactory factory,
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.InterceptorFactory |
getAfterBegin() |
Method |
getAfterBeginMethod() |
org.jboss.invocation.InterceptorFactory |
getAfterCompletion() |
Method |
getAfterCompletionMethod() |
AllowedMethodsInformation |
getAllowedMethodsInformation() |
org.jboss.invocation.InterceptorFactory |
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.InterceptorFactory |
getEjb2XRemoveMethod() |
javax.ejb.EJBLocalObject |
getEJBLocalObject(org.jboss.invocation.InterceptorContext ctx) |
javax.ejb.EJBObject |
getEJBObject(org.jboss.invocation.InterceptorContext ctx) |
org.jboss.marshalling.MarshallingConfiguration |
getMarshallingConfiguration() |
org.jboss.invocation.InterceptorFactory |
getPostActivate() |
org.jboss.invocation.InterceptorFactory |
getPrePassivate() |
Set<Object> |
getSerialiableInterceptorContextKeys() |
protected org.jboss.ejb.client.SessionID |
getSessionIdOf(org.jboss.invocation.InterceptorContext ctx) |
javax.ejb.TimerService |
getTimerService() |
protected BasicComponentInstance |
instantiateComponentInstance(AtomicReference<ManagedReference> instanceReference,
org.jboss.invocation.Interceptor preDestroyInterceptor,
Map<Method,org.jboss.invocation.Interceptor> methodInterceptors,
org.jboss.invocation.InterceptorFactoryContext interceptorContext)
Responsible for instantiating the
BasicComponentInstance . |
void |
postActivate(StatefulSessionComponentInstance instance)
This method is called after an object has been retrieved deserialized after passivation.
|
void |
prePassivate(StatefulSessionComponentInstance instance)
This method is called before an object is serialized for passivation.
|
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(org.jboss.msc.service.StopContext stopContext)
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, getModuleName, getSecurityManager, getSecurityMetaData, getTimeoutInterceptors, getTimeoutMethod, getTransactionAttributeType, getTransactionManager, getTransactionSynchronizationRegistry, getTransactionTimeout, getUserTransaction, isCallerInRole, lookup
getComponentClass, getComponentName, getCreateServiceName, getNamespaceContextSelector, 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 class BasicComponent
instance
- The instance to wrapprotected StatefulSessionComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, org.jboss.invocation.InterceptorFactoryContext 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)
PassivationManager
postActivate
in interface PassivationManager<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance>
instance
- the objectpublic void prePassivate(StatefulSessionComponentInstance instance)
PassivationManager
prePassivate
in interface PassivationManager<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance>
instance
- the objectpublic org.jboss.marshalling.MarshallingConfiguration getMarshallingConfiguration()
getMarshallingConfiguration
in interface PassivationManager<org.jboss.ejb.client.SessionID,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 methodprotected org.jboss.invocation.Interceptor createInterceptor(org.jboss.invocation.InterceptorFactory factory, org.jboss.invocation.InterceptorFactoryContext context)
public org.jboss.ejb.client.SessionID createSession()
public Cache<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance> getCache()
protected BasicComponentInstance instantiateComponentInstance(AtomicReference<ManagedReference> instanceReference, org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors, org.jboss.invocation.InterceptorFactoryContext interceptorContext)
BasicComponent
BasicComponentInstance
. This method is *not* responsible for
handling the post construct activities like injection and lifecycle invocation. That is handled by
BasicComponent.constructComponentInstance(ManagedReference, boolean, InterceptorFactoryContext)
.
instantiateComponentInstance
in class BasicComponent
protected void componentInstanceCreated(BasicComponentInstance basicComponentInstance, org.jboss.invocation.InterceptorFactoryContext context)
BasicComponent
componentInstanceCreated
in class BasicComponent
basicComponentInstance
- The component instancecontext
- The interceptor factory context used to construct the instancepublic void removeSession(org.jboss.ejb.client.SessionID sessionId)
sessionId
.sessionId
- The session idpublic org.jboss.invocation.InterceptorFactory getAfterBegin()
public org.jboss.invocation.InterceptorFactory getAfterCompletion()
public org.jboss.invocation.InterceptorFactory getBeforeCompletion()
public Method getAfterBeginMethod()
public Method getAfterCompletionMethod()
public Method getBeforeCompletionMethod()
public org.jboss.invocation.InterceptorFactory getPrePassivate()
public org.jboss.invocation.InterceptorFactory getPostActivate()
public org.jboss.invocation.InterceptorFactory getEjb2XRemoveMethod()
public void start()
BasicComponent
start
in interface Component
start
in class BasicComponent
public void stop(org.jboss.msc.service.StopContext stopContext)
BasicComponent
stop
in interface Component
stop
in class BasicComponent
stopContext
- the stop context for the component servicepublic AllowedMethodsInformation getAllowedMethodsInformation()
getAllowedMethodsInformation
in class EJBComponent
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.