Class StatefulComponentDescription

java.lang.Object
org.jboss.as.ee.component.ComponentDescription
All Implemented Interfaces:
org.jboss.as.ee.component.ResourceInjectionTarget

public class StatefulComponentDescription extends SessionBeanComponentDescription
User: jpai
  • Constructor Details

    • StatefulComponentDescription

      public StatefulComponentDescription(String componentName, String componentClassName, EjbJarDescription ejbJarDescription, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit, org.jboss.metadata.ejb.spec.SessionBeanMetaData descriptorData)
      Construct a new instance.
      Parameters:
      componentName - the component name
      componentClassName - the component instance class name
      ejbJarDescription - the module description
  • Method Details

    • createConfiguration

      public org.jboss.as.ee.component.ComponentConfiguration createConfiguration(org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
      Overrides:
      createConfiguration in class org.jboss.as.ee.component.ComponentDescription
    • getAfterBegin

      public Method getAfterBegin()
    • getAfterCompletion

      public Method getAfterCompletion()
    • getBeforeCompletion

      public Method getBeforeCompletion()
    • getSessionBeanType

      Description copied from class: SessionBeanComponentDescription
      Returns the type of the session bean
      Specified by:
      getSessionBeanType in class SessionBeanComponentDescription
      Returns:
    • setAfterBegin

      public void setAfterBegin(Method afterBegin)
    • setAfterCompletion

      public void setAfterCompletion(Method afterCompletion)
    • setBeforeCompletion

      public void setBeforeCompletion(Method afterCompletion)
    • setupViewInterceptors

      protected void setupViewInterceptors(EJBViewDescription view)
      Overrides:
      setupViewInterceptors in class SessionBeanComponentDescription
    • getSessionBeanObjectViewConfigurator

      protected org.jboss.as.ee.component.ViewConfigurator getSessionBeanObjectViewConfigurator()
      Specified by:
      getSessionBeanObjectViewConfigurator in class SessionBeanComponentDescription
    • addRemoveMethod

      public void addRemoveMethod(org.jboss.invocation.proxy.MethodIdentifier removeMethod, boolean retainIfException)
    • getRemoveMethods

    • getStatefulTimeout

      public StatefulTimeoutInfo getStatefulTimeout()
    • setStatefulTimeout

      public void setStatefulTimeout(StatefulTimeoutInfo statefulTimeout)
    • addInitMethod

      public void addInitMethod(Method method, String createMethod)
    • getInitMethods

      public Map<Method,String> getInitMethods()
    • getCache

      public CacheInfo getCache()
    • setCache

      public void setCache(CacheInfo cache)
    • isPassivationApplicable

      public boolean isPassivationApplicable()
      Overrides:
      isPassivationApplicable in class org.jboss.as.ee.component.ComponentDescription
    • setPassivationApplicable

      public void setPassivationApplicable(boolean passivationApplicable)
    • isTimerServiceApplicable

      public boolean isTimerServiceApplicable()
      EJB 3.2 spec allows the TimerService to be injected/looked up/accessed from the stateful bean so as to allow access to the TimerService.getAllTimers() method from a stateful bean. Hence we make TimerService applicable for stateful beans too. However, we return false in isTimerServiceRequired() so that a NonFunctionalTimerService is made available for the stateful bean. The NonFunctionalTimerService only allows access to TimerService.getAllTimers() and TimerService.getTimers() methods and throws an IllegalStateException for all other methods on the TimerService and that's exactly how we want it to behave for stateful beans
      Overrides:
      isTimerServiceApplicable in class org.jboss.as.ee.component.ComponentDescription
      Returns:
    • isTimerServiceRequired

      public boolean isTimerServiceRequired()
      Timeout methods and auto timer methods aren't applicable for stateful beans, hence we return false.
      Overrides:
      isTimerServiceRequired in class org.jboss.as.ee.component.ComponentDescription
      Returns:
    • getDeploymentUnitServiceName

      public org.jboss.msc.service.ServiceName getDeploymentUnitServiceName()
    • getCacheFactoryServiceName

      public org.jboss.msc.service.ServiceName getCacheFactoryServiceName()