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; }
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(); }
public ServiceRegistry getServices() { if (simpleServiceRegistry == null) { simpleServiceRegistry = new SimpleServiceRegistry(); } return simpleServiceRegistry; }
public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) { this.serviceRegistry = new SimpleServiceRegistry(); this.extensions = extensions; }
public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) { this.serviceRegistry = new SimpleServiceRegistry(); this.extensions = extensions; }
public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) { this.serviceRegistry = new SimpleServiceRegistry(); this.extensions = extensions; }
/** * 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(); }
public JBossBeanDeploymentArchive(String id, WeldDiscoveryEnvironment environment, Collection<EjbDescriptor<?>> ejbDescriptors) { this.environment = environment; this.ejbDescriptors = ejbDescriptors; this.services = new SimpleServiceRegistry(); this.id = id; }
@Override public ServiceRegistry getServices() { if (simpleServiceRegistry == null) { simpleServiceRegistry = new SimpleServiceRegistry(); } return simpleServiceRegistry; }
public AbstractWeldBeanDeploymentArchive(String id) { this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); }
public AbstractWeldBeanDeploymentArchive(String id) { this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); }
public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) { this.serviceRegistry = new SimpleServiceRegistry(); this.extensions = extensions; }
public AbstractWeldBeanDeploymentArchive(String id) { this.id = id; this.serviceRegistry = new SimpleServiceRegistry(); }
public AbstractDeployment(Collection<BeanDeploymentArchive> beanDeploymentArchives, Iterable<Metadata<Extension>> extensions) { this.services = new SimpleServiceRegistry(); this.beanDeploymentArchives = new ArrayList<BeanDeploymentArchive>(beanDeploymentArchives); this.extensions = extensions; configureServices(); }
public ServletDeployment(ServletContext servletContext) { this.webAppBeanDeploymentArchive = new WebAppBeanDeploymentArchive(servletContext); this.beanDeploymentArchives = new ArrayList<BeanDeploymentArchive>(); this.beanDeploymentArchives.add(webAppBeanDeploymentArchive); this.services = new SimpleServiceRegistry(); }
public AbstractDeployment(Collection<BeanDeploymentArchive> beanDeploymentArchives, Iterable<Metadata<Extension>> extensions) { this.services = new SimpleServiceRegistry(); this.beanDeploymentArchives = new ArrayList<BeanDeploymentArchive>(beanDeploymentArchives); this.extensions = extensions; configureServices(); }
public FlatDeployment(WeldDiscoveryEnvironment environment, Collection<EjbDescriptor<?>> ejbDescriptors) { this.beanDeploymentArchive = new JBossBeanDeploymentArchive("flat" ,environment, ejbDescriptors); this.beanDeploymentArchives = Collections.<BeanDeploymentArchive>singletonList(beanDeploymentArchive); this.services = new SimpleServiceRegistry(); }
public WebAppBeanDeploymentArchive(ServletContext servletContext) { this.classes = new HashSet<Class<?>>(); this.beansXml = new HashSet<URL>(); this.services = new SimpleServiceRegistry(); scan(servletContext); }
public BeanDeploymentArchiveImpl(Set<String> beanClasses, BeansXml beansXml, Module module, String id) { this.beanClasses = new ConcurrentSkipListSet<String>(beanClasses); 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); this.module = module; this.ejbDescriptors = new HashSet<EjbDescriptor<?>>(); }
public ServiceRegistry create() { ServiceRegistry serviceRegistry = new SimpleServiceRegistry(); serviceRegistry.addAll(services.entrySet()); serviceRegistry.add(EjbServices.class, ejbServices); return serviceRegistry; } }