Examples of WeldBootstrapService


Examples of org.jboss.as.weld.WeldBootstrapService

        final Collection<Metadata<Extension>> extensions = WeldPortableExtensions.getPortableExtensions(deploymentUnit).getExtensions();

        final WeldDeployment deployment = new WeldDeployment(beanDeploymentArchives, extensions, module, subDeploymentLoaders, deploymentUnit, rootBeanDeploymentModule);

        final WeldBootstrapService weldBootstrapService = new WeldBootstrapService(deployment, Environments.EE_INJECT, deploymentUnit.getName());

        installBootstrapConfigurationService(deployment, parent);

        weldBootstrapService.addWeldService(EjbInjectionServices.class, ejbInjectionServices);
        weldBootstrapService.addWeldService(ResourceInjectionServices.class, resourceInjectionServices);

        if (classFileServices != null) {
            weldBootstrapService.addWeldService(ClassFileServices.class, classFileServices);
        }

        final JpaInjectionServices rootJpaInjectionServices = new WeldJpaInjectionServices(deploymentUnit);
        final JaxwsInjectionServices rootJaxWsInjectionServices = new WeldJaxwsInjectionServices(deploymentUnit);
        weldBootstrapService.addWeldService(JpaInjectionServices.class, rootJpaInjectionServices);
        weldBootstrapService.addWeldService(JaxwsInjectionServices.class, rootJaxWsInjectionServices);

        // add the weld service
        final ServiceBuilder<WeldBootstrapService> weldBootstrapServiceBuilder = serviceTarget.addService(weldBootstrapServiceName, weldBootstrapService);

        weldBootstrapServiceBuilder.addDependencies(TCCLSingletonService.SERVICE_NAME);
View Full Code Here

Examples of org.jboss.as.weld.WeldBootstrapService

    @Override
    protected BeanManagerImpl getBeanManager() {
        // get the reference to the bean manager on the first invocation
        if (beanManager == null) {
            final WeldBootstrapService weldContainer = (WeldBootstrapService) currentServiceContainer().getRequiredService(weldContainerServiceName).getValue();
            beanManager = (BeanManagerImpl) weldContainer.getBeanManager();
        }
        return beanManager;
    }
View Full Code Here

Examples of org.jboss.as.weld.WeldBootstrapService

    @Override
    public Object processInvocation(final InterceptorContext context) throws Exception {
        //get the reference to the bean manager on the first invocation
        if(beanManager == null) {
            final WeldBootstrapService weldContainer = (WeldBootstrapService) currentServiceContainer().getRequiredService(weldContainerServiceName).getValue();
            beanManager = (BeanManagerImpl) weldContainer.getBeanManager();
        }

        try {
            //if this call succeeds then the context is active
            beanManager.getContext(RequestScoped.class);
View Full Code Here

Examples of org.jboss.as.weld.WeldBootstrapService

        final List<Metadata<Extension>> extensions = deploymentUnit.getAttachmentList(WeldAttachments.PORTABLE_EXTENSIONS);

        final WeldDeployment deployment = new WeldDeployment(beanDeploymentArchives, extensions, module, subDeploymentLoaders);

        final WeldBootstrapService weldBootstrapService = new WeldBootstrapService(deployment, Environments.EE_INJECT, deploymentUnit.getName());
        //hook up validation service
        //TODO: we need to change weld so this is a per-BDA service
        final ValidatorFactory factory = deploymentUnit.getAttachment(BeanValidationAttachments.VALIDATOR_FACTORY);
        weldBootstrapService.addWeldService(ValidationServices.class, new WeldValidationServices(factory));
        weldBootstrapService.addWeldService(EjbInjectionServices.class, ejbInjectionServices);

        weldBootstrapService.addWeldService(EjbServices.class, new WeldEjbServices(deploymentUnit.getServiceRegistry()));


        final JpaInjectionServices rootJpaInjectionServices = new WeldJpaInjectionServices(deploymentUnit, deploymentUnit.getServiceRegistry());
        weldBootstrapService.addWeldService(JpaInjectionServices.class, rootJpaInjectionServices);

        // add the weld service
        final ServiceBuilder<WeldBootstrapService> weldBootstrapServiceBuilder = serviceTarget.addService(weldBootstrapServiceName, weldBootstrapService);

        weldBootstrapServiceBuilder.addDependencies(TCCLSingletonService.SERVICE_NAME);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.