Package org.apache.webbeans.config
Class BeansDeployer
- java.lang.Object
-
- org.apache.webbeans.config.BeansDeployer
-
public class BeansDeployer extends Object
Deploys the all beans that are defined in theScannerServiceat the scanner phase.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBeansDeployer.ExtendedBeanAttributes<T>
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.webbeans.spi.BeanArchiveServicebeanArchiveServiceXML Configuratorprotected booleandeployedDeployment is started or notprotected booleandiscoverEjbDiscover ejb or notstatic StringJAVAX_ENTERPRISE_PACKAGEprotected booleanskipNoClassDefFoundTriggersprotected booleanskipValidationsprotected booleanskipVetoedOnPackages
-
Constructor Summary
Constructors Constructor Description BeansDeployer(WebBeansContext webBeansContext)Creates a new deployer with given xml configurator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDefaultStereoTypes()Adds default stereotypes.protected voidcheckPassivationScope(jakarta.enterprise.inject.spi.Bean<?> beanObj)Check passivations.protected voidcheckStereoTypes(Map<org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation,Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>>> beanAttributesPerBda)Check steretypes.voidconfigureProducerMethodSpecializations()Configure direct/indirect specialized producer method beans.protected <T> voiddefineEnterpriseWebBean(Class<T> clazz, jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType, jakarta.enterprise.inject.spi.BeanAttributes<T> attributes)Defines enterprise bean via plugin.protected <T> voiddefineManagedBean(jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType, BeansDeployer.ExtendedBeanAttributes extendedBeanAttributes, Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>> annotatedTypes)Defines and configures managed bean.voiddeploy(org.apache.webbeans.spi.ScannerService scanner)Deploys all the defined web beans components in the container startup.protected voiddeployFromBeanAttributes(Map<org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation,Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>>> beanAttributesPerBda)Discovers and deploys classes from class path.protected voiddeployFromXML(org.apache.webbeans.spi.ScannerService scanner)Discovers and deploys alternatives, interceptors and decorators from XML.
-
-
-
Field Detail
-
JAVAX_ENTERPRISE_PACKAGE
public static final String JAVAX_ENTERPRISE_PACKAGE
- See Also:
- Constant Field Values
-
deployed
protected boolean deployed
Deployment is started or not
-
beanArchiveService
protected org.apache.webbeans.spi.BeanArchiveService beanArchiveService
XML Configurator
-
discoverEjb
protected boolean discoverEjb
Discover ejb or not
-
skipVetoedOnPackages
protected boolean skipVetoedOnPackages
-
skipNoClassDefFoundTriggers
protected boolean skipNoClassDefFoundTriggers
-
skipValidations
protected boolean skipValidations
-
-
Constructor Detail
-
BeansDeployer
public BeansDeployer(WebBeansContext webBeansContext)
Creates a new deployer with given xml configurator.- Parameters:
webBeansContext-
-
-
Method Detail
-
deploy
public void deploy(org.apache.webbeans.spi.ScannerService scanner)
Deploys all the defined web beans components in the container startup.It deploys from the web-beans.xml files and from the class files. It uses the
ScannerServiceto get classes.- Throws:
WebBeansDeploymentException- if any deployment exception occurs
-
configureProducerMethodSpecializations
public void configureProducerMethodSpecializations()
Configure direct/indirect specialized producer method beans. Also disable 'overwritten' producer method beans. But only if they got overwritten in an enabled alternative.
-
deployFromBeanAttributes
protected void deployFromBeanAttributes(Map<org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation,Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>>> beanAttributesPerBda)
Discovers and deploys classes from class path.- Parameters:
beanAttributesPerBda- the AnnotatedTypes which got discovered so far and are not vetoed- Throws:
ClassNotFoundException- if class not found
-
deployFromXML
protected void deployFromXML(org.apache.webbeans.spi.ScannerService scanner) throws WebBeansDeploymentExceptionDiscovers and deploys alternatives, interceptors and decorators from XML.- Parameters:
scanner- discovery scanner- Throws:
WebBeansDeploymentException- if a problem occurs
-
checkPassivationScope
protected void checkPassivationScope(jakarta.enterprise.inject.spi.Bean<?> beanObj)
Check passivations.
-
checkStereoTypes
protected void checkStereoTypes(Map<org.apache.webbeans.spi.BeanArchiveService.BeanArchiveInformation,Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>>> beanAttributesPerBda)
Check steretypes.
-
addDefaultStereoTypes
protected void addDefaultStereoTypes()
Adds default stereotypes.
-
defineManagedBean
protected <T> void defineManagedBean(jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType, BeansDeployer.ExtendedBeanAttributes extendedBeanAttributes, Map<jakarta.enterprise.inject.spi.AnnotatedType<?>,BeansDeployer.ExtendedBeanAttributes<?>> annotatedTypes)Defines and configures managed bean.
-
defineEnterpriseWebBean
protected <T> void defineEnterpriseWebBean(Class<T> clazz, jakarta.enterprise.inject.spi.AnnotatedType<T> annotatedType, jakarta.enterprise.inject.spi.BeanAttributes<T> attributes)
Defines enterprise bean via plugin.- Type Parameters:
T- bean class type- Parameters:
clazz- bean class
-
-