Package org.jboss.weld.context.bound

Examples of org.jboss.weld.context.bound.BoundSessionContext.associate()


                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager
                        .getBeans(BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.associate(sessionContexts.get());
                sessionContext.activate();

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager
                        .getBeans(BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here


                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager
                        .getBeans(BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.associate(sessionContexts.get());
                sessionContext.activate();

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager
                        .getBeans(BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager
                        .getBeans(BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.associate(sessionContexts.get());
                sessionContext.activate();

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager
                        .getBeans(BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

        sessionContext.deactivate();
        sessionContext.dissociate(toContainer.getSessionStore());

        // then copy them into the other session store
        toContainer.getSessionStore().putAll(Reflections.<Map<String, Object>>cast(deserialize(bytes)));
        sessionContext.associate(toContainer.getSessionStore());

        // then activate again
        sessionContext.activate();
        use(fromId);
    }
View Full Code Here

      requestContext.activate();
     
      // TODO deactivate the conversation context
     
      BoundSessionContext sessionContext = instance().select(BoundSessionContext.class).get();
      sessionContext.associate(sessionStore);
      sessionContext.activate();
      return this;
   }

   /**
 
View Full Code Here

   public void createSession(@Observes AfterDeploy event, WeldManager manager)
   {
      BoundSessionContext sessionContext = manager.instance().select(BoundSessionContext.class).get();

      CDISessionMap map = new CDISessionMap();
      sessionContext.associate(map);
      sessionContext.activate();
      sessionMap.set(map);
   }

   public void destroySession(@Observes BeforeUnDeploy event, WeldManager manager)
View Full Code Here

                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager
                        .getBeans(BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.associate(sessionContexts.get());
                sessionContext.activate();

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager
                        .getBeans(BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

   public void createSession(@Observes AfterDeploy event, WeldManager manager)
   {
      BoundSessionContext sessionContext = manager.instance().select(BoundSessionContext.class).get();

      CDISessionMap map = new CDISessionMap();
      sessionContext.associate(map);
      sessionContext.activate();
      sessionMap.set(map);
   }

   public void destroySession(@Observes BeforeUnDeploy event, WeldManager manager)
View Full Code Here

                final Bean<BoundSessionContext> sessionContextBean = (Bean<BoundSessionContext>) manager.resolve(manager
                        .getBeans(BoundSessionContext.class, BoundLiteral.INSTANCE));
                CreationalContext<?> ctx = manager.createCreationalContext(sessionContextBean);
                final BoundSessionContext sessionContext = (BoundSessionContext) manager.getReference(sessionContextBean,
                        BoundSessionContext.class, ctx);
                sessionContext.associate(sessionContexts.get());
                sessionContext.activate();

                final Bean<BoundRequestContext> requestContextBean = (Bean<BoundRequestContext>) manager.resolve(manager
                        .getBeans(BoundRequestContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(requestContextBean);
View Full Code Here

      requestContext.activate();
     
      // TODO deactivate the conversation context
     
      BoundSessionContext sessionContext = instance().select(BoundSessionContext.class).get();
      sessionContext.associate(sessionStore);
      sessionContext.activate();
      return this;
   }

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