Package org.jboss.weld.bootstrap.api.helpers

Examples of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry


    private final String id;

    public AbstractWeldBeanDeploymentArchive(String id) {
        this.id = id;
        this.serviceRegistry = new SimpleServiceRegistry();
    }
View Full Code Here


    private final ServiceRegistry serviceRegistry;

    private final Iterable<Metadata<Extension>> extensions;

    public AbstractWeldDeployment(Bootstrap bootstrap, Iterable<Metadata<Extension>> extensions) {
        this.serviceRegistry = new SimpleServiceRegistry();
        this.extensions = extensions;
    }
View Full Code Here

    public void beforeMethod() {
        BeanIdentifierIndex beanIdentifierIndex = new BeanIdentifierIndex();
        beanIdentifierIndex.build(Collections.<Bean<?>>emptySet());
        this.typeStore = new TypeStore();
        this.classTransformer = new ClassTransformer(typeStore, new SharedObjectCache(), ReflectionCacheFactory.newInstance(typeStore), RegistrySingletonProvider.STATIC_INSTANCE);
        this.services = new SimpleServiceRegistry();
        this.services.add(MetaAnnotationStore.class, new MetaAnnotationStore(classTransformer));
        this.services.add(ContextualStore.class, new ContextualStoreImpl(STATIC_INSTANCE, beanIdentifierIndex));
        this.services.add(ClassTransformer.class, classTransformer);
        this.services.add(SharedObjectCache.class, new SharedObjectCache());
        this.services.add(GlobalObserverNotifierService.class, new GlobalObserverNotifierService(services, RegistrySingletonProvider.STATIC_INSTANCE));
View Full Code Here

        InstantiatorFactory factory = registry.get(InstantiatorFactory.class);
        if (factory == null) {
            registry.add(InstantiatorFactory.class, new DefaultInstantiatorFactory(resourceLoader));
        }

        ServiceRegistry services = new SimpleServiceRegistry();
        services.addAll(deploymentServices.entrySet());
        services.addAll(registry.entrySet());

        services.add(EJBApiAbstraction.class, new EJBApiAbstraction(resourceLoader));
        services.add(PersistenceApiAbstraction.class, new PersistenceApiAbstraction(resourceLoader));
        services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader));
        services.add(JtaApiAbstraction.class, new JtaApiAbstraction(resourceLoader));
        services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(resourceLoader));
        services.add(AnnotationApiAbstraction.class, new AnnotationApiAbstraction(resourceLoader));
        services.add(ServletApiAbstraction.class, new ServletApiAbstraction(resourceLoader));
        this.beanManager = BeanManagerImpl.newManager(deploymentManager, beanDeploymentArchive.getId(), services);
        services.add(InjectionTargetService.class, new InjectionTargetService(beanManager));
        if (beanManager.getServices().contains(EjbServices.class)) {
            // Must populate EJB cache first, as we need it to detect whether a
            // bean is an EJB!
            ejbDescriptors.addAll(beanDeploymentArchive.getEjbs());
        }

        if (services.get(BootstrapConfiguration.class).isConcurrentDeploymentEnabled() && services.contains(ExecutorServices.class)) {
            beanDeployer = new ConcurrentBeanDeployer(beanManager, ejbDescriptors, deploymentServices);
        } else {
            beanDeployer = new BeanDeployer(beanManager, ejbDescriptors, deploymentServices);
        }
        beanManager.getServices().get(SpecializationAndEnablementRegistry.class).registerEnvironment(beanManager, beanDeployer.getEnvironment(), additionalBeanArchive);
View Full Code Here

    }

    @Override
    public ServiceRegistry getServices() {
        if (simpleServiceRegistry == null) {
            simpleServiceRegistry = new SimpleServiceRegistry();
        }
        return simpleServiceRegistry;
    }
View Full Code Here

  
   private Deployment createDeployment(final Class<?>... classes)
   {
      final BeanDeploymentArchive beanArchive = new BeanDeploymentArchive()
      {
         private ServiceRegistry registry = new SimpleServiceRegistry();
        
         public ServiceRegistry getServices()
         {
            return registry;
         }
View Full Code Here

        return match;
    }

    public ServiceRegistry getServices() {
        if (simpleServiceRegistry == null) {
            simpleServiceRegistry = new SimpleServiceRegistry();
        }
        return simpleServiceRegistry;
    }
View Full Code Here

    }

    @Override
    public ServiceRegistry getServices() {
        if (simpleServiceRegistry == null) {
            simpleServiceRegistry = new SimpleServiceRegistry();
        }
        return simpleServiceRegistry;
    }
View Full Code Here

        return match;
    }

    public ServiceRegistry getServices() {
        if (simpleServiceRegistry == null) {
            simpleServiceRegistry = new SimpleServiceRegistry();
        }
        return simpleServiceRegistry;
    }
View Full Code Here

    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<?>>();
    }
View Full Code Here

TOP

Related Classes of org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.