Package org.jboss.weld.context.bound

Examples of org.jboss.weld.context.bound.BoundConversationContext.activate()


                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                BoundRequest request = new MutableBoundRequest(requestContexts.get(), sessionContexts.get());
                boundRequests.set(request);
                conversationContext.associate(request);
                conversationContext.activate();
            }
        } catch (NamingException e) {
            log.error("Failed to setup Weld contexts", e);
        }
    }
View Full Code Here


                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                BoundRequest request = new MutableBoundRequest(requestContexts.get(), sessionContexts.get());
                boundRequests.set(request);
                conversationContext.associate(request);
                conversationContext.activate();
            }
        } catch (NamingException e) {
            WeldLogger.ROOT_LOGGER.failedToSetupWeldContexts(e);
        }
    }
View Full Code Here

                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                BoundRequest request = new MutableBoundRequest(requestContexts.get(), sessionContexts.get());
                boundRequests.set(request);
                conversationContext.associate(request);
                conversationContext.activate();
            }
        } catch (NamingException e) {
            WeldLogger.ROOT_LOGGER.failedToSetupWeldContexts(e);
        }
    }
View Full Code Here

        // Set up the conversation context
        BoundRequest request1 = new BoundRequestImpl(container1.getSessionStore());
        BoundConversationContext conversationContext1 = Utils.getReference(beanManager1, BoundConversationContext.class);
        conversationContext1.associate(request1);
        conversationContext1.activate();

        // Set a value into Baz1
        Baz baz1 = Utils.getReference(beanManager1, Baz.class);
        baz1.setName("pete");
View Full Code Here

        conversationContext1.dissociate(request1);

        // and start another, propagating the conversation
        request1 = new BoundRequestImpl(container1.getSessionStore());
        conversationContext1.associate(request1);
        conversationContext1.activate(cid);

        // refetch the test bean and check it has the right value
        baz1 = Utils.getReference(beanManager1, Baz.class);
        assert baz1.getName().equals("pete");
        assert !conversation1.isTransient();
View Full Code Here

        // Set up the conversation context
        BoundRequest request2 = new BoundRequestImpl(container2.getSessionStore());
        BoundConversationContext conversationContext2 = Utils.getReference(beanManager2, BoundConversationContext.class);
        conversationContext2.associate(request2);
        conversationContext2.activate(cid);

        Baz baz2 = Utils.getReference(beanManager2, Baz.class);
        assert baz2.getName().equals("pete");

        Conversation conversation2 = Utils.getReference(beanManager2, Conversation.class);
View Full Code Here

      BoundRequest request = new MutableBoundRequest(requestMap.get(), sessionMap.get());
      this.boundRequest.set(request);
     
      BoundConversationContext conversationContext = manager.instance().select(BoundConversationContext.class).get();
      conversationContext.associate(request);
      conversationContext.activate(id.getId());
   }

   public void destroyConversation(@Observes(precedence = 1) After event, WeldManager manager)
   {
      if(!enableConversationScope)
View Full Code Here

                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                BoundRequest request = new MutableBoundRequest(requestContexts.get(), sessionContexts.get());
                boundRequests.set(request);
                conversationContext.associate(request);
                conversationContext.activate();
            }
        } catch (NamingException e) {
            log.error("Failed to setup Weld contexts", e);
        }
    }
View Full Code Here

      BoundRequest request = new MutableBoundRequest(requestMap.get(), sessionMap.get());
      this.boundRequest.set(request);
     
      BoundConversationContext conversationContext = manager.instance().select(BoundConversationContext.class).get();
      conversationContext.associate(request);
      conversationContext.activate(id.getId());
   }

   public void destroyConversation(@Observes(precedence = 1) After event, WeldManager manager)
   {
      if(!enableConversationScope)
View Full Code Here

                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                BoundRequest request = new MutableBoundRequest(requestContexts.get(), sessionContexts.get());
                boundRequests.set(request);
                conversationContext.associate(request);
                conversationContext.activate();
            }
        } catch (NamingException e) {
            WeldLogger.ROOT_LOGGER.failedToSetupWeldContexts(e);
        }
    }
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.