Package org.jboss.as.ejb3.component
Class EJBComponentDescription
- java.lang.Object
-
- org.jboss.as.ee.component.ComponentDescription
-
- org.jboss.as.ejb3.component.EJBComponentDescription
-
- All Implemented Interfaces:
ResourceInjectionTarget
- Direct Known Subclasses:
MessageDrivenComponentDescription,SessionBeanComponentDescription
public abstract class EJBComponentDescription extends ComponentDescription
- Author:
- Carlo de Wolf NOTE: References in this document to Enterprise JavaBeans(EJB) refer to the Jakarta Enterprise Beans unless otherwise noted.
-
-
Constructor Summary
Constructors Constructor Description EJBComponentDescription(String componentName, String componentClassName, EjbJarDescription ejbJarDescription, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit, org.jboss.metadata.ejb.spec.EnterpriseBeanMetaData descriptorData)Construct a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddCurrentInvocationContextFactory()Setup the current invocation context interceptor, which will be used during the post-construct lifecycle of the component instanceprotected abstract voidaddCurrentInvocationContextFactory(ViewDescription view)Setup the current invocation context interceptor, which will be used during the invocation on the view (methods)voidaddDeclaredRoles(String... roles)voidaddEjbLocalObjectView(String viewClassName)voidaddEjbObjectView(String viewClassName)protected voidaddEJBSuspendHandlerDependency()Sets up aComponentConfiguratorwhich then sets up the dependency on the EJBSuspendHandlerService service for theEJBComponentCreateServicevoidaddLocalHome(String localHome)voidaddRemoteHome(String remoteHome)protected voidaddRemoteTransactionsDependency()Adds a dependency for the ComponentConfiguration on the remote transaction service if the EJB exposes at least one remote viewvoidaddScheduleMethod(Method method, AutoTimer timer)protected voidaddTransactionManagerDependencies()Sets up aComponentConfiguratorwhich then sets up the relevant dependencies on the transaction manager services for theEJBComponentCreateServicevoidexcludeClassLevelContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)voidexcludeDefaultContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)Set<InterceptorDescription>getAllContainerInterceptors()Returns a combined map of class and method level container interceptorsApplicableMethodInformation<EJBMethodSecurityAttribute>getAnnotationMethodPermissions()List<InterceptorDescription>getClassLevelContainerInterceptors()Set<String>getDeclaredRoles()List<InterceptorDescription>getDefaultContainerInterceptors()StringgetDefinedSecurityDomain()org.jboss.metadata.ejb.spec.EnterpriseBeanMetaDatagetDescriptorData()ApplicableMethodInformation<EJBMethodSecurityAttribute>getDescriptorMethodPermissions()StringgetEJBClassName()EjbHomeViewDescriptiongetEjbHomeView()EjbHomeViewDescriptiongetEjbLocalHomeView()EJBViewDescriptiongetEjbLocalView()StringgetEJBName()EJBViewDescriptiongetEjbRemoteView()HashMap<Integer,org.jboss.invocation.InterceptorFactory>getElytronInterceptorFactories(String policyContextID, boolean enableJacc, boolean propagateSecurity)Map<org.jboss.invocation.proxy.MethodIdentifier,List<InterceptorDescription>>getMethodLevelContainerInterceptors()StringgetResolvedSecurityDomain()Returns the security domain that is applicable for this bean.StringgetRunAs()StringgetRunAsPrincipal()Map<Method,List<AutoTimer>>getScheduleMethods()org.jboss.msc.service.ServiceNamegetSecurityDomainServiceName()Map<String,Collection<String>>getSecurityRoleLinks()org.jboss.metadata.javaee.spec.SecurityRolesMetaDatagetSecurityRoles()ServerInterceptorCachegetServerInterceptorCache()ShutDownInterceptorFactorygetShutDownInterceptorFactory()MethodgetTimeoutMethod()Set<org.jboss.invocation.proxy.MethodIdentifier>getTimerMethods()javax.ejb.TimerServicegetTimerService()ApplicableMethodInformation<javax.ejb.TransactionAttributeType>getTransactionAttributes()javax.ejb.TransactionManagementTypegetTransactionManagementType()ApplicableMethodInformation<Integer>getTransactionTimeouts()booleanhasBeanLevelSecurityMetadata()Returns true if this component description has any security metadata configured at the EJB level.booleanisEntity()booleanisExcludeClassLevelContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)booleanisExcludeDefaultContainerInterceptors()booleanisExcludeDefaultContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)booleanisExposedViaIiop()booleanisMessageDriven()BooleanisMissingMethodPermissionsDeniedAccess()booleanisOutflowSecurityDomainsConfigured()booleanisSecurityRequired()booleanisSession()booleanisSingleton()booleanisStateful()booleanisStateless()voidlinkSecurityRoles(String fromRole, String toRole)protected EJBViewDescriptionregisterView(String viewClassName, org.jboss.metadata.ejb.spec.MethodInterfaceType viewType)protected EJBViewDescriptionregisterView(String viewClassName, org.jboss.metadata.ejb.spec.MethodInterfaceType viewType, boolean ejb2xView)booleanrequiresJacc()booleanrequiresLegacyCompliantPrincipalPropagation()voidsetClassLevelContainerInterceptors(List<InterceptorDescription> containerInterceptors)voidsetDeclaredRoles(Collection<String> roles)voidsetDefaultContainerInterceptors(List<InterceptorDescription> defaultInterceptors)voidsetDefaultSecurityDomain(String defaultSecurityDomain)voidsetDefinedSecurityDomain(String definedSecurityDomain)voidsetExcludeDefaultContainerInterceptors(boolean excludeDefaultContainerInterceptors)voidsetExposedViaIiop(boolean exposedViaIiop)voidsetLegacyCompliantPrincipalPropagation(boolean legacyCompliantPrincipalPropagation)voidsetMethodContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier, List<InterceptorDescription> containerInterceptors)voidsetMissingMethodPermissionsDenyAccess(Boolean missingMethodPermissionsDenyAccess)voidsetOutflowSecurityDomainsConfigured(BooleanSupplier outflowSecurityDomainsConfigured)voidsetRequiresJacc(boolean requiresJacc)voidsetRunAs(String role)voidsetRunAsPrincipal(String principal)voidsetSecurityDomainServiceName(org.jboss.msc.service.ServiceName securityDomainServiceName)voidsetSecurityRequired(boolean securityRequired)voidsetSecurityRoles(org.jboss.metadata.javaee.spec.SecurityRolesMetaData securityRoles)voidsetServerInterceptorCache(ServerInterceptorCache serverInterceptorCache)voidsetTimeoutMethod(Method timeoutMethod)voidsetTimerService(javax.ejb.TimerService timerService)voidsetTransactionManagementType(javax.ejb.TransactionManagementType transactionManagementType)protected voidsetupClientViewInterceptors(ViewDescription view)protected voidsetupRemoteView(EJBViewDescription viewDescription)protected voidsetupSecurityInterceptors(ViewDescription view)protected voidsetupViewInterceptors(EJBViewDescription view)StringtoString()-
Methods inherited from class org.jboss.as.ee.component.ComponentDescription
addClassInterceptor, addDependency, addInterceptorMethodOverride, addMethodInterceptor, addResourceInjection, createConfiguration, 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, isPassivationApplicable, isTimerServiceApplicable, isTimerServiceRequired, mergeInterceptorConfig, setBeanDeploymentArchiveId, setClassInterceptors, setContextServiceName, setDefaultInterceptors, setDeploymentDescriptorEnvironment, setExcludeDefaultInterceptors, setIgnoreLifecycleInterceptors, setMethodInterceptors, setNamingMode
-
-
-
-
Constructor Detail
-
EJBComponentDescription
public EJBComponentDescription(String componentName, String componentClassName, EjbJarDescription ejbJarDescription, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit, org.jboss.metadata.ejb.spec.EnterpriseBeanMetaData descriptorData)
Construct a new instance.- Parameters:
componentName- the component namecomponentClassName- the component instance class nameejbJarDescription- the moduledeploymentUnitServiceName-descriptorData- the optional descriptor metadata
-
-
Method Detail
-
addLocalHome
public void addLocalHome(String localHome)
-
addRemoteHome
public void addRemoteHome(String remoteHome)
-
addEjbLocalObjectView
public void addEjbLocalObjectView(String viewClassName)
-
addEjbObjectView
public void addEjbObjectView(String viewClassName)
-
getTransactionManagementType
public javax.ejb.TransactionManagementType getTransactionManagementType()
-
setTransactionManagementType
public void setTransactionManagementType(javax.ejb.TransactionManagementType transactionManagementType)
-
getEJBName
public String getEJBName()
-
getEJBClassName
public String getEJBClassName()
-
setupViewInterceptors
protected void setupViewInterceptors(EJBViewDescription view)
-
setupClientViewInterceptors
protected void setupClientViewInterceptors(ViewDescription view)
-
addCurrentInvocationContextFactory
protected abstract void addCurrentInvocationContextFactory()
Setup the current invocation context interceptor, which will be used during the post-construct lifecycle of the component instance
-
addCurrentInvocationContextFactory
protected abstract void addCurrentInvocationContextFactory(ViewDescription view)
Setup the current invocation context interceptor, which will be used during the invocation on the view (methods)- Parameters:
view- The view for which the interceptor has to be setup
-
addRemoteTransactionsDependency
protected void addRemoteTransactionsDependency()
Adds a dependency for the ComponentConfiguration on the remote transaction service if the EJB exposes at least one remote view
-
addTransactionManagerDependencies
protected void addTransactionManagerDependencies()
Sets up aComponentConfiguratorwhich then sets up the relevant dependencies on the transaction manager services for theEJBComponentCreateService
-
addEJBSuspendHandlerDependency
protected void addEJBSuspendHandlerDependency()
Sets up aComponentConfiguratorwhich then sets up the dependency on the EJBSuspendHandlerService service for theEJBComponentCreateService
-
setupSecurityInterceptors
protected void setupSecurityInterceptors(ViewDescription view)
-
isEntity
public boolean isEntity()
-
isMessageDriven
public boolean isMessageDriven()
-
isSession
public boolean isSession()
-
isSingleton
public boolean isSingleton()
-
isStateful
public boolean isStateful()
-
isStateless
public boolean isStateless()
-
addDeclaredRoles
public void addDeclaredRoles(String... roles)
-
setDeclaredRoles
public void setDeclaredRoles(Collection<String> roles)
-
setRunAs
public void setRunAs(String role)
-
getRunAs
public String getRunAs()
-
setRunAsPrincipal
public void setRunAsPrincipal(String principal)
-
getRunAsPrincipal
public String getRunAsPrincipal()
-
setDefaultSecurityDomain
public void setDefaultSecurityDomain(String defaultSecurityDomain)
-
setOutflowSecurityDomainsConfigured
public void setOutflowSecurityDomainsConfigured(BooleanSupplier outflowSecurityDomainsConfigured)
-
isOutflowSecurityDomainsConfigured
public boolean isOutflowSecurityDomainsConfigured()
-
getResolvedSecurityDomain
public String getResolvedSecurityDomain()
Returns the security domain that is applicable for this bean. In the absence of any explicit configuration of a security domain for this bean, this method returns the default security domain (if any) that's configured for all beans in the EJB3 subsystem- Returns:
-
setMissingMethodPermissionsDenyAccess
public void setMissingMethodPermissionsDenyAccess(Boolean missingMethodPermissionsDenyAccess)
-
isMissingMethodPermissionsDeniedAccess
public Boolean isMissingMethodPermissionsDeniedAccess()
-
getSecurityRoles
public org.jboss.metadata.javaee.spec.SecurityRolesMetaData getSecurityRoles()
-
setSecurityRoles
public void setSecurityRoles(org.jboss.metadata.javaee.spec.SecurityRolesMetaData securityRoles)
-
setSecurityDomainServiceName
public void setSecurityDomainServiceName(org.jboss.msc.service.ServiceName securityDomainServiceName)
-
getSecurityDomainServiceName
public org.jboss.msc.service.ServiceName getSecurityDomainServiceName()
-
setDefinedSecurityDomain
public void setDefinedSecurityDomain(String definedSecurityDomain)
-
getDefinedSecurityDomain
public String getDefinedSecurityDomain()
-
requiresJacc
public boolean requiresJacc()
-
setRequiresJacc
public void setRequiresJacc(boolean requiresJacc)
-
setLegacyCompliantPrincipalPropagation
public void setLegacyCompliantPrincipalPropagation(boolean legacyCompliantPrincipalPropagation)
-
requiresLegacyCompliantPrincipalPropagation
public boolean requiresLegacyCompliantPrincipalPropagation()
-
registerView
protected EJBViewDescription registerView(String viewClassName, org.jboss.metadata.ejb.spec.MethodInterfaceType viewType)
-
registerView
protected EJBViewDescription registerView(String viewClassName, org.jboss.metadata.ejb.spec.MethodInterfaceType viewType, boolean ejb2xView)
-
setupRemoteView
protected void setupRemoteView(EJBViewDescription viewDescription)
-
getSecurityRoleLinks
public Map<String,Collection<String>> getSecurityRoleLinks()
-
hasBeanLevelSecurityMetadata
public boolean hasBeanLevelSecurityMetadata()
Returns true if this component description has any security metadata configured at the EJB level. Else returns false. Note that this method does *not* consider method level security metadata.- Returns:
-
getTimerService
public javax.ejb.TimerService getTimerService()
-
setTimerService
public void setTimerService(javax.ejb.TimerService timerService)
-
getDescriptorData
public org.jboss.metadata.ejb.spec.EnterpriseBeanMetaData getDescriptorData()
-
getTimeoutMethod
public Method getTimeoutMethod()
-
setTimeoutMethod
public void setTimeoutMethod(Method timeoutMethod)
-
getEjbLocalView
public EJBViewDescription getEjbLocalView()
-
getEjbLocalHomeView
public EjbHomeViewDescription getEjbLocalHomeView()
-
getEjbHomeView
public EjbHomeViewDescription getEjbHomeView()
-
getEjbRemoteView
public EJBViewDescription getEjbRemoteView()
-
isExposedViaIiop
public boolean isExposedViaIiop()
-
setExposedViaIiop
public void setExposedViaIiop(boolean exposedViaIiop)
-
getTransactionAttributes
public ApplicableMethodInformation<javax.ejb.TransactionAttributeType> getTransactionAttributes()
-
getTransactionTimeouts
public ApplicableMethodInformation<Integer> getTransactionTimeouts()
-
getDescriptorMethodPermissions
public ApplicableMethodInformation<EJBMethodSecurityAttribute> getDescriptorMethodPermissions()
-
getAnnotationMethodPermissions
public ApplicableMethodInformation<EJBMethodSecurityAttribute> getAnnotationMethodPermissions()
-
setDefaultContainerInterceptors
public void setDefaultContainerInterceptors(List<InterceptorDescription> defaultInterceptors)
-
getDefaultContainerInterceptors
public List<InterceptorDescription> getDefaultContainerInterceptors()
-
setClassLevelContainerInterceptors
public void setClassLevelContainerInterceptors(List<InterceptorDescription> containerInterceptors)
-
getClassLevelContainerInterceptors
public List<InterceptorDescription> getClassLevelContainerInterceptors()
-
setExcludeDefaultContainerInterceptors
public void setExcludeDefaultContainerInterceptors(boolean excludeDefaultContainerInterceptors)
-
isExcludeDefaultContainerInterceptors
public boolean isExcludeDefaultContainerInterceptors()
-
excludeDefaultContainerInterceptors
public void excludeDefaultContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
-
isExcludeDefaultContainerInterceptors
public boolean isExcludeDefaultContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
-
excludeClassLevelContainerInterceptors
public void excludeClassLevelContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
-
isExcludeClassLevelContainerInterceptors
public boolean isExcludeClassLevelContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
-
getMethodLevelContainerInterceptors
public Map<org.jboss.invocation.proxy.MethodIdentifier,List<InterceptorDescription>> getMethodLevelContainerInterceptors()
-
setMethodContainerInterceptors
public void setMethodContainerInterceptors(org.jboss.invocation.proxy.MethodIdentifier methodIdentifier, List<InterceptorDescription> containerInterceptors)
-
getTimerMethods
public Set<org.jboss.invocation.proxy.MethodIdentifier> getTimerMethods()
- Overrides:
getTimerMethodsin classComponentDescription
-
getAllContainerInterceptors
public Set<InterceptorDescription> getAllContainerInterceptors()
Returns a combined map of class and method level container interceptors
-
getServerInterceptorCache
public ServerInterceptorCache getServerInterceptorCache()
-
setServerInterceptorCache
public void setServerInterceptorCache(ServerInterceptorCache serverInterceptorCache)
-
getShutDownInterceptorFactory
public ShutDownInterceptorFactory getShutDownInterceptorFactory()
-
getElytronInterceptorFactories
public HashMap<Integer,org.jboss.invocation.InterceptorFactory> getElytronInterceptorFactories(String policyContextID, boolean enableJacc, boolean propagateSecurity)
-
setSecurityRequired
public void setSecurityRequired(boolean securityRequired)
-
isSecurityRequired
public boolean isSecurityRequired()
-
-