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, setRollbackOnlycreateViewInstanceProxy, 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, lookupgetComponentClass, getComponentName, getCreateServiceName, getNamespaceContextSelector, toString, waitForComponentStartpublic static final Object SESSION_ID_REFERENCE_KEY
protected StatefulSessionComponent(StatefulSessionComponentCreateService ejbComponentCreateService)
ejbComponentCreateService - the component configurationpublic StatefulSessionComponentInstance createInstance()
BasicComponentcreateInstance in interface ComponentcreateInstance in interface StatefulObjectFactory<StatefulSessionComponentInstance>createInstance in class BasicComponentpublic StatefulSessionComponentInstance createInstance(Object instance)
BasicComponentcreateInstance in class BasicComponentinstance - The instance to wrapprotected StatefulSessionComponentInstance constructComponentInstance(ManagedReference instance, boolean invokePostConstruct, org.jboss.invocation.InterceptorFactoryContext context)
BasicComponentconstructComponentInstance in class BasicComponentinstance - An instance to be wrapped, or null if a new instance should be createdpublic void destroyInstance(StatefulSessionComponentInstance instance)
StatefulObjectFactorydestroyInstance in interface StatefulObjectFactory<StatefulSessionComponentInstance>instance - the instance to destroypublic void postActivate(StatefulSessionComponentInstance instance)
PassivationManagerpostActivate in interface PassivationManager<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance>instance - the objectpublic void prePassivate(StatefulSessionComponentInstance instance)
PassivationManagerprePassivate 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 SessionBeanComponentIllegalStateExceptionpublic javax.ejb.EJBLocalObject getEJBLocalObject(org.jboss.invocation.InterceptorContext ctx)
throws IllegalStateException
getEJBLocalObject in class SessionBeanComponentIllegalStateExceptionpublic javax.ejb.EJBObject getEJBObject(org.jboss.invocation.InterceptorContext ctx)
throws IllegalStateException
getEJBObject in class SessionBeanComponentIllegalStateExceptionpublic javax.ejb.TimerService getTimerService()
throws IllegalStateException
getTimerService in class EJBComponentIllegalStateExceptionpublic 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)
BasicComponentBasicComponentInstance. 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 BasicComponentprotected void componentInstanceCreated(BasicComponentInstance basicComponentInstance, org.jboss.invocation.InterceptorFactoryContext context)
BasicComponentcomponentInstanceCreated in class BasicComponentbasicComponentInstance - 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()
BasicComponentstart in interface Componentstart in class BasicComponentpublic void stop(org.jboss.msc.service.StopContext stopContext)
BasicComponentstop in interface Componentstop in class BasicComponentstopContext - the stop context for the component servicepublic AllowedMethodsInformation getAllowedMethodsInformation()
getAllowedMethodsInformation in class EJBComponentCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.