Package org.jboss.arquillian.container.weld.se.embedded_1.beans

Examples of org.jboss.arquillian.container.weld.se.embedded_1.beans.MyBean


      throw new UnsupportedOperationException("Descriptors not supported by Weld");     
   }

   public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException
   {
      final ShrinkwrapBeanDeploymentArchive beanArchive = archive.as(ShrinkwrapBeanDeploymentArchive.class);

      final org.jboss.weld.bootstrap.spi.Deployment deployment = new org.jboss.weld.bootstrap.spi.Deployment()
      {
         public Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
         {
            return Arrays.asList((BeanDeploymentArchive)beanArchive);
         }
        
         public ServiceRegistry getServices()
         {
            return beanArchive.getServices();
         }
        
         public BeanDeploymentArchive loadBeanDeploymentArchive
               Class<?> beanClass)
         {
            return beanArchive;
         }
      };

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

      classLoaderManagerProducer.set(classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
View Full Code Here


      throw new UnsupportedOperationException("Descriptors not supported by Weld");     
   }

   public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException
   {
      final ShrinkwrapBeanDeploymentArchive beanArchive = archive.as(ShrinkwrapBeanDeploymentArchive.class);

      final org.jboss.weld.bootstrap.spi.Deployment deployment = new org.jboss.weld.bootstrap.spi.Deployment()
      {
         public Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
         {
            return Arrays.asList((BeanDeploymentArchive)beanArchive);
         }
        
         public ServiceRegistry getServices()
         {
            return beanArchive.getServices();
         }
        
         public BeanDeploymentArchive loadBeanDeploymentArchive
               Class<?> beanClass)
         {
            return beanArchive;
         }
      };

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

      classLoaderManagerProducer.set(classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
View Full Code Here

      throw new UnsupportedOperationException("Descriptors not supported by Weld");     
   }

   public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException
   {
      final ShrinkwrapBeanDeploymentArchive beanArchive = archive.as(ShrinkwrapBeanDeploymentArchive.class);

      final org.jboss.weld.bootstrap.spi.Deployment deployment = new org.jboss.weld.bootstrap.spi.Deployment()
      {
         public Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
         {
            return Arrays.asList((BeanDeploymentArchive)beanArchive);
         }
        
         public ServiceRegistry getServices()
         {
            return beanArchive.getServices();
         }
        
         public BeanDeploymentArchive loadBeanDeploymentArchive
               Class<?> beanClass)
         {
            return beanArchive;
         }
        
         /* (non-Javadoc)
          * @see org.jboss.weld.bootstrap.spi.Deployment#getExtensions()
          */
         public Iterable<Metadata<Extension>> getExtensions()
         {
            return ServiceLoader.load(Extension.class, beanArchive.getClassLoader());
         }
      };
     
      ContextClassLoaderManager classLoaderManager = new ContextClassLoaderManager(beanArchive.getClassLoader());
      classLoaderManager.enable();

      classLoaderManagerInst.set(classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
      beanArchive.setBootstrap(bootstrap);
     
      bootstrap.startContainer(Environments.SE, deployment)
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
View Full Code Here

    * @see org.jboss.arquillian.spi.DeployableContainer#deploy(org.jboss.arquillian.spi.Context, org.jboss.shrinkwrap.api.Archive)
    */
   public ContainerMethodExecutor deploy(Context context, final Archive<?> archive)
         throws DeploymentException
   {
      final ShrinkwrapBeanDeploymentArchive beanArchive = archive.as(ShrinkwrapBeanDeploymentArchive.class);

      final Deployment deployment = new Deployment()
      {
         public Collection<BeanDeploymentArchive> getBeanDeploymentArchives()
         {
            return Arrays.asList((BeanDeploymentArchive)beanArchive);
         }
        
         public ServiceRegistry getServices()
         {
            return beanArchive.getServices();
         }
        
         public BeanDeploymentArchive loadBeanDeploymentArchive
               Class<?> beanClass)
         {
            return beanArchive;
         }
      };
     
      ContextClassLoaderManager classLoaderManager = new ContextClassLoaderManager(beanArchive.getClassLoader());
      classLoaderManager.enable();

      context.add(ContextClassLoaderManager.class, classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.weld.se.embedded_1.beans.MyBean

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.