Class StatefulComponentDescription
- java.lang.Object
-
- org.jboss.as.ee.component.ComponentDescription
-
- org.jboss.as.ejb3.component.EJBComponentDescription
-
- org.jboss.as.ejb3.component.session.SessionBeanComponentDescription
-
- org.jboss.as.ejb3.component.stateful.StatefulComponentDescription
-
- All Implemented Interfaces:
ResourceInjectionTarget
public class StatefulComponentDescription extends SessionBeanComponentDescription
User: jpai
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStatefulComponentDescription.StatefulRemoveMethod-
Nested classes/interfaces inherited from class org.jboss.as.ejb3.component.session.SessionBeanComponentDescription
SessionBeanComponentDescription.SessionBeanType
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInitMethod(Method method, String createMethod)voidaddRemoveMethod(org.jboss.invocation.proxy.MethodIdentifier removeMethod, boolean retainIfException)ComponentConfigurationcreateConfiguration(org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)MethodgetAfterBegin()MethodgetAfterCompletion()MethodgetBeforeCompletion()CacheInfogetCache()org.jboss.msc.service.ServiceNamegetCacheFactoryServiceName()org.jboss.msc.service.ServiceNamegetDeploymentUnitServiceName()Map<Method,String>getInitMethods()Collection<StatefulComponentDescription.StatefulRemoveMethod>getRemoveMethods()protected ViewConfiguratorgetSessionBeanObjectViewConfigurator()SessionBeanComponentDescription.SessionBeanTypegetSessionBeanType()Returns the type of the session beanStatefulTimeoutInfogetStatefulTimeout()booleanisPassivationApplicable()booleanisTimerServiceApplicable()EJB 3.2 spec allows the TimeService to be injected/looked up/accessed from the stateful bean so as to allow access to theTimerService.getAllTimers()method from a stateful bean.booleanisTimerServiceRequired()Timeout methods and auto timer methods aren't applicable for stateful beans, hence we return false.voidsetAfterBegin(Method afterBegin)voidsetAfterCompletion(Method afterCompletion)voidsetBeforeCompletion(Method afterCompletion)voidsetCache(CacheInfo cache)voidsetPassivationApplicable(boolean passivationApplicable)voidsetStatefulTimeout(StatefulTimeoutInfo statefulTimeout)protected voidsetupViewInterceptors(EJBViewDescription view)-
Methods inherited from class org.jboss.as.ejb3.component.session.SessionBeanComponentDescription
addAsynchronousClass, addAsynchronousMethod, addCurrentInvocationContextFactory, addCurrentInvocationContextFactory, addLocalBusinessInterfaceViews, addLocalBusinessInterfaceViews, addNoInterfaceView, addRemoteBusinessInterfaceViews, addTxManagementInterceptorForView, addWebserviceEndpointView, getAsynchronousClasses, getAsynchronousMethods, getBeanLevelAccessTimeout, getBeanLevelLockType, getConcurrencyManagementType, getDescriptorData, getMappedName, getMethodApplicableAccessTimeouts, getMethodApplicableLockTypes, hasNoInterfaceView, isSession, isSingleton, isStateful, isStateless, setAccessTimeout, setBeanLevelAccessTimeout, setBeanLevelLockType, setConcurrencyManagementType, setLockType, setMappedName
-
Methods inherited from class org.jboss.as.ejb3.component.EJBComponentDescription
addDeclaredRoles, addEjbLocalObjectView, addEjbObjectView, addEJBSuspendHandlerDependency, addLocalHome, addRemoteHome, addRemoteTransactionsDependency, addScheduleMethod, addTransactionManagerDependencies, excludeClassLevelContainerInterceptors, excludeDefaultContainerInterceptors, getAllContainerInterceptors, getAnnotationMethodPermissions, getClassLevelContainerInterceptors, getDeclaredRoles, getDefaultContainerInterceptors, getDefinedSecurityDomain, getDescriptorMethodPermissions, getEJBClassName, getEjbHomeView, getEjbLocalHomeView, getEjbLocalView, getEJBName, getEjbRemoteView, getElytronInterceptorFactories, getMethodLevelContainerInterceptors, getResolvedSecurityDomain, getRunAs, getRunAsPrincipal, getScheduleMethods, getSecurityDomainServiceName, getSecurityRoleLinks, getSecurityRoles, getServerInterceptorCache, getShutDownInterceptorFactory, getTimeoutMethod, getTimerMethods, getTimerService, getTransactionAttributes, getTransactionManagementType, getTransactionTimeouts, hasBeanLevelSecurityMetadata, isEntity, isExcludeClassLevelContainerInterceptors, isExcludeDefaultContainerInterceptors, isExcludeDefaultContainerInterceptors, isExposedViaIiop, isMessageDriven, isMissingMethodPermissionsDeniedAccess, isOutflowSecurityDomainsConfigured, isSecurityRequired, linkSecurityRoles, registerView, registerView, requiresJacc, requiresLegacyCompliantPrincipalPropagation, setClassLevelContainerInterceptors, setDeclaredRoles, setDefaultContainerInterceptors, setDefaultSecurityDomain, setDefinedSecurityDomain, setExcludeDefaultContainerInterceptors, setExposedViaIiop, setLegacyCompliantPrincipalPropagation, setMethodContainerInterceptors, setMissingMethodPermissionsDenyAccess, setOutflowSecurityDomainsConfigured, setRequiresJacc, setRunAs, setRunAsPrincipal, setSecurityDomainServiceName, setSecurityRequired, setSecurityRoles, setServerInterceptorCache, setTimeoutMethod, setTimerService, setTransactionManagementType, setupClientViewInterceptors, setupRemoteView, setupSecurityInterceptors, toString
-
Methods inherited from class org.jboss.as.ee.component.ComponentDescription
addClassInterceptor, addDependency, addInterceptorMethodOverride, addMethodInterceptor, addResourceInjection, excludeClassInterceptors, excludeDefaultInterceptors, getAllInterceptors, getApplicationName, getBeanDeploymentArchiveId, getBindingConfigurations, getClassInterceptor, getClassInterceptors, getComponentClassName, getComponentName, getConfigurators, getContextServiceName, getCreateServiceName, getDefaultInterceptors, getDependencies, getDeploymentDescriptorEnvironment, getMethodInterceptors, getModuleDescription, getModuleName, getNamingMode, getResourceInjections, getServiceName, getStartServiceName, getViews, isCDIInterceptorEnabled, isExcludeClassInterceptors, isExcludeDefaultInterceptors, isExcludeDefaultInterceptors, isIgnoreLifecycleInterceptors, isIntercepted, isOptional, mergeInterceptorConfig, setBeanDeploymentArchiveId, setClassInterceptors, setContextServiceName, setDefaultInterceptors, setDeploymentDescriptorEnvironment, setExcludeDefaultInterceptors, setIgnoreLifecycleInterceptors, setMethodInterceptors, setNamingMode
-
-
-
-
Constructor Detail
-
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 namecomponentClassName- the component instance class nameejbJarDescription- the module description
-
-
Method Detail
-
createConfiguration
public ComponentConfiguration createConfiguration(org.jboss.as.server.deployment.reflect.ClassReflectionIndex classIndex, ClassLoader moduleClassLoader, org.jboss.modules.ModuleLoader moduleLoader)
- Overrides:
createConfigurationin classComponentDescription
-
getAfterBegin
public Method getAfterBegin()
-
getAfterCompletion
public Method getAfterCompletion()
-
getBeforeCompletion
public Method getBeforeCompletion()
-
getSessionBeanType
public SessionBeanComponentDescription.SessionBeanType getSessionBeanType()
Description copied from class:SessionBeanComponentDescriptionReturns the type of the session bean- Specified by:
getSessionBeanTypein classSessionBeanComponentDescription- 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:
setupViewInterceptorsin classSessionBeanComponentDescription
-
getSessionBeanObjectViewConfigurator
protected ViewConfigurator getSessionBeanObjectViewConfigurator()
- Specified by:
getSessionBeanObjectViewConfiguratorin classSessionBeanComponentDescription
-
addRemoveMethod
public void addRemoveMethod(org.jboss.invocation.proxy.MethodIdentifier removeMethod, boolean retainIfException)
-
getRemoveMethods
public Collection<StatefulComponentDescription.StatefulRemoveMethod> getRemoveMethods()
-
getStatefulTimeout
public StatefulTimeoutInfo getStatefulTimeout()
-
setStatefulTimeout
public void setStatefulTimeout(StatefulTimeoutInfo statefulTimeout)
-
getCache
public CacheInfo getCache()
-
setCache
public void setCache(CacheInfo cache)
-
isPassivationApplicable
public boolean isPassivationApplicable()
- Overrides:
isPassivationApplicablein classComponentDescription
-
setPassivationApplicable
public void setPassivationApplicable(boolean passivationApplicable)
-
isTimerServiceApplicable
public boolean isTimerServiceApplicable()
EJB 3.2 spec allows the TimeService to be injected/looked up/accessed from the stateful bean so as to allow access to theTimerService.getAllTimers()method from a stateful bean. Hence we make timerservice applicable for stateful beans too. However, we returnfalseinisTimerServiceRequired()so that aNonFunctionalTimerServiceis made available for the stateful bean. TheNonFunctionalTimerServiceonly allows access toTimerService.getAllTimers()andTimerService.getTimers()methods and throws anIllegalStateExceptionfor all othre methods on the timerservice and that's exactly how we want it to behave for stateful beans- Overrides:
isTimerServiceApplicablein classComponentDescription- Returns:
-
isTimerServiceRequired
public boolean isTimerServiceRequired()
Timeout methods and auto timer methods aren't applicable for stateful beans, hence we return false.- Overrides:
isTimerServiceRequiredin classComponentDescription- Returns:
-
getDeploymentUnitServiceName
public org.jboss.msc.service.ServiceName getDeploymentUnitServiceName()
-
getCacheFactoryServiceName
public org.jboss.msc.service.ServiceName getCacheFactoryServiceName()
-
-