public WeldBootstrapService(final WeldDeployment deployment, final Environment environment, final String deploymentName, final Consumer<WeldBootstrapService> weldBootstrapServiceConsumer, final Supplier<ExecutorServices> executorServicesSupplier, final Supplier<ExecutorService> serverExecutorSupplier, final Supplier<SecurityServices> securityServicesSupplier, final Supplier<TransactionServices> weldTransactionServicesSupplier ) { this.deployment = deployment; this.environment = environment; this.deploymentName = deploymentName; this.weldBootstrapServiceConsumer = weldBootstrapServiceConsumer; this.executorServicesSupplier = executorServicesSupplier; this.serverExecutorSupplier = serverExecutorSupplier; this.securityServicesSupplier = securityServicesSupplier; this.weldTransactionServicesSupplier = weldTransactionServicesSupplier; this.bootstrap = new WeldBootstrap(); Map<String, BeanDeploymentArchive> bdas = new HashMap<String, BeanDeploymentArchive>(); BeanDeploymentArchiveImpl rootBeanDeploymentArchive = null; for (BeanDeploymentArchive archive : deployment.getBeanDeploymentArchives()) { bdas.put(archive.getId(), archive); if (archive instanceof BeanDeploymentArchiveImpl) { BeanDeploymentArchiveImpl bda = (BeanDeploymentArchiveImpl) archive; if (bda.isRoot()) { rootBeanDeploymentArchive = bda; } } } this.rootBeanDeploymentArchive = rootBeanDeploymentArchive; this.beanDeploymentArchives = Collections.unmodifiableMap(bdas); }
public WeldBootstrapService(WeldDeployment deployment, Environment environment, final String deploymentName) { this.deployment = deployment; this.environment = environment; this.deploymentName = deploymentName; this.bootstrap = new WeldBootstrap(); Map<String, BeanDeploymentArchive> bdas = new HashMap<String, BeanDeploymentArchive>(); for (BeanDeploymentArchive archive : deployment.getBeanDeploymentArchives()) { bdas.put(archive.getId(), archive); } bdas.put(deployment.getAdditionalBeanDeploymentArchive().getId(), deployment.getAdditionalBeanDeploymentArchive()); this.beanDeploymentArchives = Collections.unmodifiableMap(bdas); }