Examples of WeldBootstrap


Examples of org.jbehave.core.configuration.weld.WeldBootstrap

    }

    public AnnotationBuilder annotationBuilder() {
        if (container == null) {
            container = new WeldBootstrap();
            container.initialize();
        }
        return container.findAnnotationBuilder(testClass());
    }
View Full Code Here

Examples of org.jbehave.core.configuration.weld.WeldBootstrap

    private WeldBootstrap container;

    public WeldAnnotatedEmbedderRunner(Class<?> testClass) throws InitializationError {
        super(testClass);

        container = new WeldBootstrap();
        container.initialize();

        this.annotationBuilder = container.findAnnotationBuilder(testClass());
    }
View Full Code Here

Examples of org.jbehave.core.configuration.weld.WeldBootstrap

        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThat(builderAnnotated.buildConfiguration(), sameInstance(configuration));
    }
   
    private AnnotationBuilder createBuilder(Class<?> type) {
        WeldBootstrap bootstrap = new WeldBootstrap();
        bootstrap.initialize();
        AnnotationBuilder builder = bootstrap.findAnnotationBuilder(type);
        assertThat(builder, is(AnnotationBuilder.class));
        return builder;
    }
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

      ContextClassLoaderManager classLoaderManager = new ContextClassLoaderManager(beanArchive.getClassLoader());
      classLoaderManager.enable();

      classLoaderManagerProducer.set(classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
      bootstrap.startContainer(Environments.SE, deployment, new ConcurrentHashMapBeanStore())
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();

      WeldManager manager = bootstrap.getManager(beanArchive);
     
      weldBootstrapProducer.set(bootstrap);
      weldManagerProducer.set(manager);
      beanManagerProducer.set(manager);
     
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

      return new ProtocolMetaData(); // local execution only, not specific protocol metadata needed
   }

   public void undeploy(Archive<?> archive) throws DeploymentException
   {
      WeldBootstrap bootstrap = weldBootstrapProducer.get();
      if(bootstrap != null)
      {
         bootstrap.shutdown();
      }
      ContextClassLoaderManager classLoaderManager = classLoaderManagerProducer.get();
      classLoaderManager.disable();
   }
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

    private volatile boolean started;

    public WeldContainer(WeldDeployment deployment, Environment environment) {
        this.deployment = deployment;
        this.environment = environment;
        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());
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

    private volatile boolean started;

    public WeldContainer(WeldDeployment deployment, Environment environment) {
        this.deployment = deployment;
        this.environment = environment;
        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());
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

    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>();
        BeanDeploymentArchiveImpl rootBeanDeploymentArchive = null;
        for (BeanDeploymentArchive archive : deployment.getBeanDeploymentArchives()) {
            bdas.put(archive.getId(), archive);
            if (archive instanceof BeanDeploymentArchiveImpl) {
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

                ejb.getEjbBundleDescriptor().getModuleDescriptor().getDescriptor();

        // First get BeanDeploymentArchive for this ejb
        BeanDeploymentArchive bda = getBDAForBeanClass(topLevelBundleDesc, ejb.getEjbClassName());
    
        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(ejb.getEjbBundleDescriptor().getApplication());
        WeldManager weldManager = bootstrap.getManager(bda);

        org.jboss.weld.ejb.spi.EjbDescriptor ejbDesc = weldManager.getEjbDescriptor(ejb.getName());

        // Get an the Bean object
        Bean<?> bean = weldManager.getBean(ejbDesc);
View Full Code Here

Examples of org.jboss.weld.bootstrap.WeldBootstrap

        BundleDescriptor topLevelBundleDesc = (BundleDescriptor) bundle.getModuleDescriptor().getDescriptor();

        // First get BeanDeploymentArchive for this ejb
        BeanDeploymentArchive bda = weldDeployer.getBeanDeploymentArchiveForBundle(topLevelBundleDesc);
        //BeanDeploymentArchive bda = getBDAForBeanClass(topLevelBundleDesc, managedObject.getClass().getName());
        WeldBootstrap bootstrap = weldDeployer.getBootstrapForApp(bundle.getApplication());
        BeanManager beanManager = bootstrap.getManager(bda);
        AnnotatedType annotatedType = beanManager.createAnnotatedType(managedObject.getClass());
        InjectionTarget it = beanManager.createInjectionTarget(annotatedType);
        CreationalContext cc = beanManager.createCreationalContext(null);
        it.inject(managedObject, cc);
    }
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.