public BeanDeploymentArchiveImpl(Set<String> beanClasses, Set<String> allClasses, BeansXml beansXml, Module module, String id, BeanArchiveType beanArchiveType, boolean root) { this.beanClasses = new ConcurrentSkipListSet<String>(beanClasses); this.allKnownClasses = new ConcurrentSkipListSet<String>(allClasses); this.beanDeploymentArchives = new CopyOnWriteArraySet<BeanDeploymentArchive>(); this.beansXml = beansXml; this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); this.resourceLoader = new WeldModuleResourceLoader(module); this.serviceRegistry.add(ResourceLoader.class, resourceLoader); for (Entry<Class<? extends Service>, Service> entry : ServiceLoaders.loadBeanDeploymentArchiveServices(BeanDeploymentArchiveImpl.class, this) .entrySet()) { this.serviceRegistry.add(entry.getKey(), Reflections.cast(entry.getValue())); } this.module = module; this.ejbDescriptors = new HashSet<EjbDescriptor<?>>(); this.beanArchiveType = beanArchiveType; this.root = root; }
@Override public void cleanup() { cleanupAfterBoot(); } }
@Override public <T> Singleton<T> create(Class<? extends T> type) { return new RegistrySingleton<T>(); }
@Override public <T> Singleton<T> create(Class<? extends T> type) { return new TCCLSingleton<T>(); }
@Override public <T> Singleton<T> create(Class<? extends T> type) { return new IsolatedStaticSingleton<T>(); }
public WeldDeployment(Set<BeanDeploymentArchiveImpl> beanDeploymentArchives, Collection<Metadata<Extension>> extensions, Module module, Set<ClassLoader> subDeploymentClassLoaders, DeploymentUnit deploymentUnit, BeanDeploymentModule rootBeanDeploymentModule, Map<ModuleIdentifier, EEModuleDescriptor> eeModuleDescriptors) { this.subDeploymentClassLoaders = new HashSet<ClassLoader>(subDeploymentClassLoaders); this.beanDeploymentArchives = Collections.newSetFromMap(new ConcurrentHashMap<>()); this.beanDeploymentArchives.addAll(beanDeploymentArchives); this.extensions = new HashSet<Metadata<Extension>>(extensions); this.serviceRegistry = new SimpleServiceRegistry(); this.additionalBeanDeploymentArchivesByClassloader = new ConcurrentHashMap<>(); this.module = module; this.rootBeanDeploymentModule = rootBeanDeploymentModule; this.eeModuleDescriptors = eeModuleDescriptors; // add static services this.serviceRegistry.add(ProxyServices.class, new ProxyServicesImpl(module)); this.serviceRegistry.add(ResourceLoader.class, new WeldModuleResourceLoader(module)); calculateAccessibilityGraph(this.beanDeploymentArchives); makeTopLevelBdasVisibleFromStaticModules(); }
@Override public void cleanup() { cleanupAfterBoot(); } }
@Override public <T> Singleton<T> create(Class<? extends T> type) { return new RegistrySingleton<T>(); }
@Override public <T> Singleton<T> create(Class<? extends T> type) { return new TCCLSingleton<T>(); }
/** * Creates a bean deployment archive with the given ID. The ID is suffixed with the bundle ID. * * @param id * archive identity */ public BundleBeanDeploymentArchive(String id) { this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); }
@Override public void cleanup() { cleanupAfterBoot(); } }
public JBossBeanDeploymentArchive(String id, WeldDiscoveryEnvironment environment, Collection<EjbDescriptor<?>> ejbDescriptors) { this.environment = environment; this.ejbDescriptors = ejbDescriptors; this.services = new SimpleServiceRegistry(); this.id = id; }
@Override public void cleanup() { cleanupAfterBoot(); } }
@Override public ServiceRegistry getServices() { if (simpleServiceRegistry == null) { simpleServiceRegistry = new SimpleServiceRegistry(); } return simpleServiceRegistry; }
@Override public void cleanup() { cleanupAfterBoot(); } }
public ServiceRegistry getServices() { if (simpleServiceRegistry == null) { simpleServiceRegistry = new SimpleServiceRegistry(); } return simpleServiceRegistry; }
@Override public void cleanup() { cleanupAfterBoot(); } }
public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) { this.serviceRegistry = new SimpleServiceRegistry(); this.extensions = extensions; }
@Override public void cleanup() { cleanupAfterBoot(); } }
public AbstractWeldBeanDeploymentArchive(String id) { this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); }