Class BeansDeployer


  • public class BeansDeployer
    extends Object
    Deploys the all beans that are defined in the ScannerService at the scanner phase.
    • Field Detail

      • 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 ScannerService to 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 WebBeansDeploymentException
        Discovers 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.
      • 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