Package org.jboss.weld.context.api.helpers

Examples of org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore


      classLoaderManager.enable();

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


   @Before
   public void setup() throws Exception
   {
      Deployment deployment = createDeployment(Service.class, Cat.class, CatService.class, Dog.class, DogService.class);
      bootstrap = new WeldBootstrap();
      bootstrap.startContainer(Environments.SE, deployment, new ConcurrentHashMapBeanStore())
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();
View Full Code Here

      classLoaderManager.enable();

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

         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

            return beanArchive;
         }
      };
     
      WeldBootstrap bootstrap = new WeldBootstrap();
      bootstrap.startContainer(Environments.SE, deployment, new ConcurrentHashMapBeanStore())
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();
View Full Code Here

         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

            return beanArchive;
         }
      };
     
      WeldBootstrap bootstrap = new WeldBootstrap();
      bootstrap.startContainer(Environments.SE, deployment, new ConcurrentHashMapBeanStore())
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();

      WeldManager manager = bootstrap.getManager(beanArchive);
     
      // start the session lifecycle
      manager.getServices().get(ContextLifecycle.class).restoreSession(manager.getId(), new ConcurrentHashMapBeanStore());
     
      WELD_MANAGER.set(
            new WeldHolder(
                  bootstrap,
                  manager));

      // TODO: replace with a before/after invoke interceptor ?
      return new LocalMethodExecutor() {
         @Override
         public TestResult invoke(TestMethodExecutor testMethodExecutor)
         {
            WeldManager manager = WELD_MANAGER.get().getManager();
            String requestId = UUID.randomUUID().toString();
            try
            {
              // start the request lifecycle
              manager.getServices().get(ContextLifecycle.class).beginRequest(requestId, new ConcurrentHashMapBeanStore());
              return super.invoke(testMethodExecutor);
            }
            finally
            {
              // end the request lifecycle
              manager.getServices().get(ContextLifecycle.class).endRequest(requestId, new ConcurrentHashMapBeanStore());
            }
         }
      };
   }
View Full Code Here

      classLoaderManager.enable();

      context.add(ContextClassLoaderManager.class, classLoaderManager);
     
      WeldBootstrap bootstrap = new WeldBootstrap();
      bootstrap.startContainer(Environments.SE, deployment, new ConcurrentHashMapBeanStore())
                  .startInitialization()
                  .deployBeans()
                  .validateBeans()
                  .endInitialization();
View Full Code Here

         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

         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);
     
View Full Code Here

TOP

Related Classes of org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore

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.