Examples of BoundConversationContext


Examples of org.jboss.weld.context.bound.BoundConversationContext

                requestContext.dissociate(requestContexts.get());

                final Bean<BoundConversationContext> conversationContextBean = (Bean<BoundConversationContext>) manager
                        .resolve(manager.getBeans(BoundConversationContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(conversationContextBean);
                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                conversationContext.deactivate();
                conversationContext.dissociate(boundRequests.get());
            }
        } catch (NamingException e) {
            log.error("Failed to tear down Weld contexts", e);
        } finally {
            sessionContexts.remove();
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundConversationContext

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

Examples of org.jboss.weld.context.bound.BoundConversationContext

      if(!enableConversationScope)
      {
         return;
      }

      BoundConversationContext conversationContext = manager.instance().select(BoundConversationContext.class).get();
      if (!conversationContext.isActive()) {
          // if a conversation was not activated due to an exception before calling the createConversation
          return;
      }
      if (!conversationContext.getCurrentConversation().isTransient())
      {
         conversationId.set(new CDIConversationID(conversationContext.getCurrentConversation().getId()));
      }
      else
      {
         conversationId.set(new CDIConversationID(null));
      }

      BoundRequest request = boundRequest.get();

      try
      {
         conversationContext.invalidate();
         conversationContext.deactivate();
      }
      finally
      {
         conversationContext.dissociate(request);
      }
   }
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundConversationContext

                requestContext.activate();

                final Bean<BoundConversationContext> conversationContextBean = (Bean<BoundConversationContext>) manager
                        .resolve(manager.getBeans(BoundConversationContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(conversationContextBean);
                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

Examples of org.jboss.weld.context.bound.BoundConversationContext

                requestContext.dissociate(requestContexts.get());

                final Bean<BoundConversationContext> conversationContextBean = (Bean<BoundConversationContext>) manager
                        .resolve(manager.getBeans(BoundConversationContext.class, BoundLiteral.INSTANCE));
                ctx = manager.createCreationalContext(conversationContextBean);
                final BoundConversationContext conversationContext = (BoundConversationContext) manager.getReference(
                        conversationContextBean, BoundConversationContext.class, ctx);
                conversationContext.invalidate();
                conversationContext.deactivate();
                conversationContext.dissociate(boundRequests.get());
            }
        } catch (NamingException e) {
            WeldLogger.ROOT_LOGGER.failedToTearDownWeldContexts(e);
        } finally {
            sessionContexts.remove();
View Full Code Here

Examples of org.jboss.weld.context.bound.BoundConversationContext

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

Examples of org.jboss.weld.context.bound.BoundConversationContext

      if(!enableConversationScope)
      {
         return;
      }

      BoundConversationContext conversationContext = manager.instance().select(BoundConversationContext.class).get();
      if (!conversationContext.getCurrentConversation().isTransient())
      {
         conversationId.set(new CDIConversationID(conversationContext.getCurrentConversation().getId()));
      }
      else
      {
         conversationId.set(new CDIConversationID(null));
      }

      BoundRequest request = boundRequest.get();

      try
      {
         conversationContext.invalidate();
         conversationContext.deactivate();
      }
      finally
      {
         conversationContext.dissociate(request);
      }
   }
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.