Class StatefulSessionComponent

java.lang.Object
org.jboss.as.ee.component.BasicComponent
org.jboss.as.ejb3.component.EJBComponent
org.jboss.as.ejb3.component.session.SessionBeanComponent
org.jboss.as.ejb3.component.stateful.StatefulSessionComponent
All Implemented Interfaces:
org.jboss.as.ee.component.Component, StatefulSessionBeanInstanceFactory<StatefulSessionComponentInstance>, org.jboss.as.server.suspend.ServerActivityCallback

public class StatefulSessionComponent extends SessionBeanComponent implements StatefulSessionBeanInstanceFactory<StatefulSessionComponentInstance>
Stateful Session Bean
Author:
Carlo de Wolf
  • Constructor Details

    • StatefulSessionComponent

      protected StatefulSessionComponent(StatefulSessionComponentCreateService ejbComponentCreateService)
      Construct a new instance.
      Parameters:
      ejbComponentCreateService - the component configuration
  • Method Details

    • createInstance

      public StatefulSessionComponentInstance createInstance()
      Description copied from interface: StatefulSessionBeanInstanceFactory
      Create a new instance of this component. This may be invoked by a component interceptor, a client interceptor, or in the course of creating a new client, or in the case of an "eager" singleton, at component start. This method will block until the component is available. If the component fails to start then a runtime exception will be thrown.

      The instance has been injected and post-construct has been called.

      Specified by:
      createInstance in interface org.jboss.as.ee.component.Component
      Specified by:
      createInstance in interface StatefulSessionBeanInstanceFactory<StatefulSessionComponentInstance>
      Overrides:
      createInstance in class org.jboss.as.ee.component.BasicComponent
      Returns:
      the component instance
    • createInstance

      public StatefulSessionComponentInstance createInstance(Object instance)
      Specified by:
      createInstance in interface org.jboss.as.ee.component.Component
      Overrides:
      createInstance in class org.jboss.as.ee.component.BasicComponent
    • constructComponentInstance

      protected StatefulSessionComponentInstance constructComponentInstance(org.jboss.as.naming.ManagedReference instance, boolean invokePostConstruct)
      Overrides:
      constructComponentInstance in class org.jboss.as.ee.component.BasicComponent
    • constructComponentInstance

      protected StatefulSessionComponentInstance constructComponentInstance(org.jboss.as.naming.ManagedReference instance, boolean invokePostConstruct, Map<Object,Object> context)
      Overrides:
      constructComponentInstance in class org.jboss.as.ee.component.BasicComponent
    • getSessionIdOf

      protected org.jboss.ejb.client.SessionID getSessionIdOf(org.jboss.invocation.InterceptorContext ctx)
    • getBusinessObject

      public <T> T getBusinessObject(Class<T> businessInterface, org.jboss.invocation.InterceptorContext context) throws IllegalStateException
      Overrides:
      getBusinessObject in class SessionBeanComponent
      Throws:
      IllegalStateException
    • getEJBLocalObject

      public jakarta.ejb.EJBLocalObject getEJBLocalObject(org.jboss.invocation.InterceptorContext ctx) throws IllegalStateException
      Overrides:
      getEJBLocalObject in class SessionBeanComponent
      Throws:
      IllegalStateException
    • getEJBObject

      public jakarta.ejb.EJBObject getEJBObject(org.jboss.invocation.InterceptorContext ctx) throws IllegalStateException
      Overrides:
      getEJBObject in class SessionBeanComponent
      Throws:
      IllegalStateException
    • getAccessTimeout

      public AccessTimeoutDetails getAccessTimeout(Method method)
      Returns the AccessTimeout applicable to given method
    • createSession

      public org.jboss.ejb.client.SessionID createSession()
    • createSessionRemote

      public org.jboss.ejb.client.SessionID createSessionRemote()
      creates a session using the global request controller. This should only be used by callers that service remote requests (i.e. places that represent a remote entry point into the container)
      Returns:
      The session id
    • getCache

      public StatefulSessionBeanCache<org.jboss.ejb.client.SessionID,StatefulSessionComponentInstance> getCache()
    • instantiateComponentInstance

      protected org.jboss.as.ee.component.BasicComponentInstance instantiateComponentInstance(org.jboss.invocation.Interceptor preDestroyInterceptor, Map<Method,org.jboss.invocation.Interceptor> methodInterceptors, Map<Object,Object> context)
      Overrides:
      instantiateComponentInstance in class org.jboss.as.ee.component.BasicComponent
    • getAfterBegin

      public org.jboss.invocation.Interceptor getAfterBegin()
    • getAfterCompletion

      public org.jboss.invocation.Interceptor getAfterCompletion()
    • getBeforeCompletion

      public org.jboss.invocation.Interceptor getBeforeCompletion()
    • getAfterBeginMethod

      public Method getAfterBeginMethod()
    • getAfterCompletionMethod

      public Method getAfterCompletionMethod()
    • getBeforeCompletionMethod

      public Method getBeforeCompletionMethod()
    • getPrePassivate

      public org.jboss.invocation.Interceptor getPrePassivate()
    • getPostActivate

      public org.jboss.invocation.Interceptor getPostActivate()
    • getEjb2XRemoveMethod

      public org.jboss.invocation.Interceptor getEjb2XRemoveMethod()
    • init

      public void init()
      Overrides:
      init in class EJBComponent
    • createInterceptors

      protected void createInterceptors(org.jboss.invocation.InterceptorFactoryContext context)
      Overrides:
      createInterceptors in class org.jboss.as.ee.component.BasicComponent
    • done

      public void done()
      Specified by:
      done in interface org.jboss.as.server.suspend.ServerActivityCallback
      Overrides:
      done in class EJBComponent
    • getAllowedMethodsInformation

      public AllowedMethodsInformation getAllowedMethodsInformation()
      Overrides:
      getAllowedMethodsInformation in class EJBComponent
    • getSerialiableInterceptorContextKeys

      public Set<Object> getSerialiableInterceptorContextKeys()
    • isRemotable

      public boolean isRemotable(Throwable throwable)
      Specified by:
      isRemotable in interface org.jboss.as.ee.component.Component
    • shouldDiscard

      public boolean shouldDiscard(Exception ex, Method method)