Examples of WeldManager


Examples of org.jboss.weld.manager.api.WeldManager

                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();

      WeldManager manager = bootstrap.getManager(beanArchive);
     
      context.add(WeldBootstrap.class, bootstrap);
      context.add(WeldManager.class, manager);
     
      return new LocalMethodExecutor();
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
     
      Conversation conversation = Utils.getBeanReference(manager, Conversation.class);
      if(!conversation.isTransient())
      {
         context.add(CDIConversationID.class, new CDIConversationID(conversation.getId()));
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
      if(manager == null)
      {
         throw new IllegalStateException("No " + WeldManager.class.getName() + " found in context");
      }
      ContextLifecycle lifeCycle = manager.getServices().get(ContextLifecycle.class);

      String sessionId = UUID.randomUUID().toString();
      BeanStore beanStore = new ConcurrentHashMapBeanStore();
     
      lifeCycle.restoreSession(sessionId, beanStore);
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

      {
         private Map<String, HttpSession> sessionStore = new HashMap<String, HttpSession>();
        
         public void callback(Context context, TestEvent event) throws Exception
         {
            WeldManager manager = context.get(WeldManager.class);
            CDISessionID id = context.get(CDISessionID.class);
            if(id != null)
            {
               HttpSessionManager sessionManager = Utils.getBeanReference(manager, HttpSessionManager.class);
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
      if(manager == null)
      {
         throw new IllegalStateException("No " + WeldManager.class.getName() + " found in context");
      }
      ContextLifecycle lifeCycle = manager.getServices().get(ContextLifecycle.class);

      String requestId = UUID.randomUUID().toString();
      BeanStore beanStore = new ConcurrentHashMapBeanStore();
     
      lifeCycle.getDependentContext().setActive(true);
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
      if(manager == null)
      {
         throw new IllegalStateException("No " + WeldManager.class.getName() + " found in context");
      }
     
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
      CDIRequestID id = context.get(CDIRequestID.class);
      if(id != null)
      {
         ContextLifecycle lifeCycle = manager.getServices().get(ContextLifecycle.class);
        
         lifeCycle.getDependentContext().setActive(false);
         lifeCycle.getRequestContext().setActive(false);
      }
   }
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

   /* (non-Javadoc)
    * @see org.jboss.arquillian.spi.event.EventHandler#callback(org.jboss.arquillian.spi.Context, java.lang.Object)
    */
   public void callback(Context context, Event event) throws Exception
   {
      WeldManager manager = context.get(WeldManager.class);
      CDISessionID id = context.get(CDISessionID.class);
      if(id != null)
      {
         manager.getServices().get(ContextLifecycle.class).endSession(id.getId(), id.getBeanStore());
      }
   }
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

        // 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);

        // Create the injection target
        InjectionTarget it = weldManager.createInjectionTarget(ejbDesc);

        // Per instance required, create the creational context
        CreationalContext<?> cc = weldManager.createCreationalContext(bean);  
 
      Object beanInstance = instance;
   
      if( beanInstance == null ) {
          // Create instance , perform constructor injection.
View Full Code Here

Examples of org.jboss.weld.manager.api.WeldManager

          bootstrapProducer.set(bootstrap);
      }


      // Assume a flat structure
      WeldManager manager = container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next());
      weldManagerProducer.set(manager);
      beanManagerProducer.set(manager);

      return new ProtocolMetaData();
   }
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.