Examples of ConcurrentHashMapBeanStore


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

    *
    * @return the bean store instance
    */
   protected BeanStore createBeanStore()
   {
      return new ConcurrentHashMapBeanStore();
   }
View Full Code Here

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

        wbListener.contextInitialized(new ServletContextEvent(sc));
    }

    @BeforeMethod
    public void beforeMethod() {
        BeanStore reqBS = new ConcurrentHashMapBeanStore();
        RequestContext.instance().setBeanStore(reqBS);
        RequestContext.instance().setActive(true);
        BeanStore sessBS = new ConcurrentHashMapBeanStore();
        SessionContext.instance().setBeanStore(sessBS);
        SessionContext.instance().setActive(true);
    }
View Full Code Here

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

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

   @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

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

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

         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

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

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

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

         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

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

            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

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

      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
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.