Map<AnnotatedType<?>, ExtendedBeanAttributes<?>> annotatedTypes = new HashMap<>(); BeansDeployer beansDeployer = new BeansDeployer(wbc);
fireBeforeBeanDiscoveryEvent(); configureDefaultBeans(); Map<BeanArchiveInformation, List<AnnotatedType<?>>> annotatedTypesPerBda = annotatedTypesFromClassPath(scanner); addAdditionalAnnotatedTypes(webBeansContext.getBeanManagerImpl().getAdditionalAnnotatedTypes(), globalBdaAnnotatedTypes); registerAlternativesDecoratorsAndInterceptorsWithPriority(at); deployFromXML(scanner); addAdditionalAnnotatedTypes(fireAfterTypeDiscoveryEvent(), globalBdaAnnotatedTypes); = getBeanAttributes(annotatedTypesPerBda); checkStereoTypes(beanAttributesPerBda); deployFromBeanAttributes(beanAttributesPerBda); configureProducerMethodSpecializations(); removeDisabledBeans(); fireAfterBeanDiscoveryEvent(); validateAlternatives(beanAttributesPerBda); validateInjectionPoints();
deployer.deploy(scannerService);
checkPassivationScope(bean); validateBeanNames(beanNames);
/** * Create AnnotatedTypes from the ClassPath via the ScannerService */ private Map<BeanArchiveInformation, List<AnnotatedType<?>>> annotatedTypesFromClassPath(ScannerService scanner) { logger.fine("Creating AnnotatedTypes from class files has started."); Set<Class<?>> foundClasses = new HashSet<>(100); Map<BeanArchiveInformation, List<AnnotatedType<?>>> annotatedTypesPerBda = new HashMap<>(); if (scanner instanceof BdaScannerService) { Map<BeanArchiveInformation, Set<Class<?>>> beanClassesPerBda = ((BdaScannerService) scanner).getBeanClassesPerBda(); for (Map.Entry<BeanArchiveInformation, Set<Class<?>>> bdaEntry : beanClassesPerBda.entrySet()) { List<AnnotatedType<?>> annotatedTypes = annotatedTypesFromBdaClassPath(bdaEntry.getValue(), foundClasses); annotatedTypesPerBda.put(bdaEntry.getKey(), annotatedTypes); } // also add the rest of the class es to the default bda // we also need this initialised in case annotatedTypes get added manually at a later step annotatedTypesPerBda.put(defaultBeanArchiveInformation, annotatedTypesFromBdaClassPath(scanner.getBeanClasses(), foundClasses)); } else { // this path is only for backward compat to older ScannerService implementations Set<Class<?>> classIndex = scanner.getBeanClasses(); List<AnnotatedType<?>> annotatedTypes = annotatedTypesFromBdaClassPath(classIndex, foundClasses); annotatedTypesPerBda.put(defaultBeanArchiveInformation, annotatedTypes); } return annotatedTypesPerBda; }
deployer.deploy(scannerService); } catch (final Exception e1) { SystemInstance.get().getComponent(Assembler.class).getLogger().error("CDI Beans module deployment failed", e1);
/** * Manages unused conversations */ public OpenEJBLifecycle(final WebBeansContext webBeansContext) { this.webBeansContext = webBeansContext; this.beanManager = webBeansContext.getBeanManagerImpl(); this.deployer = new BeansDeployer(webBeansContext); this.jndiService = webBeansContext.getService(JNDIService.class); this.scannerService = webBeansContext.getScannerService(); this.contextsService = webBeansContext.getContextsService(); }
deployer.deploy(scannerService);
protected AbstractLifeCycle(Properties properties, WebBeansContext webBeansContext) { beforeInitApplication(properties); this.webBeansContext = webBeansContext; beanManager = this.webBeansContext.getBeanManagerImpl(); deployer = new BeansDeployer(webBeansContext); jndiService = this.webBeansContext.getService(JNDIService.class); scannerService = this.webBeansContext.getScannerService(); contextsService = this.webBeansContext.getService(ContextsService.class); initApplication(properties); }
public OpenEJBLifecycle(final WebBeansContext webBeansContext) { this.webBeansContext = webBeansContext; beforeInitApplication(null); this.beanManager = webBeansContext.getBeanManagerImpl(); this.xmlDeployer = new WebBeansXMLConfigurator(); this.deployer = new BeansDeployer(this.xmlDeployer, webBeansContext); this.jndiService = webBeansContext.getService(JNDIService.class); this.beanManager.setXMLConfigurator(this.xmlDeployer); this.scannerService = webBeansContext.getScannerService(); this.contextsService = webBeansContext.getContextsService(); initApplication(null); }