Package org.jboss.weld.context

Examples of org.jboss.weld.context.ContextLifecycle


      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.beginRequest(requestId, beanStore);
     
      context.register(endRequestEvent, new DestoryRequest(requestId, beanStore));
   }
View Full Code Here


      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);
      context.register(endSessionEvent, new DestorySession(sessionId, beanStore));
   }
View Full Code Here

      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);
      context.add(CDISessionID.class, new CDISessionID(sessionId, beanStore));
   }
View Full Code Here

      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);
      lifeCycle.getRequestContext().setActive(true);
      lifeCycle.getRequestContext().setBeanStore(beanStore);
     
      context.add(CDIRequestID.class, new CDIRequestID(requestId, beanStore));
   }
View Full Code Here

   {
      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

TOP

Related Classes of org.jboss.weld.context.ContextLifecycle

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.