Examples of ConversationManager


Examples of org.apache.webbeans.conversation.ConversationManager

            if(!JSFUtil.isOwbApplication())
            {
                return;
            }
           
            ConversationManager conversationManager = ConversationManager.getInstance();
            Conversation conversation = conversationManager.getConversationBeanReference();

            if (conversation.isTransient())
            {
                logger.debug("Destroying the conversation context with cid : [{0}]", conversation.getId());
                ContextFactory.destroyConversationContext();                                                   
View Full Code Here

Examples of org.apache.webbeans.conversation.ConversationManager

        if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW) && JSFUtil.isOwbApplication())
        {
            //It looks for cid parameter in the JSF request.
            //If request contains cid, then it must restore conversation
            //Otherwise create NonexistentException
            ConversationManager conversationManager = ConversationManager.getInstance();
            Conversation conversation = conversationManager.getConversationBeanReference();
            String cid = JSFUtil.getConversationId();

            if (conversation.isTransient())
            {
                logger.debug("Creating a new transitional conversation with cid : [{0}]", conversation.getId());
                ContextFactory.initConversationContext(null);

                //Not restore, throw exception
                if(cid != null && !cid.equals(""))
                {
                    throw new NonexistentConversationException("Propogated conversation with cid=" + cid + " is not restored. It creates a new transient conversation.");
                }
            }
            else
            {
                logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());

                //Conversation must be used by one thread at a time
                ConversationImpl owbConversation = (ConversationImpl)conversation;
                if(!owbConversation.getInUsed().compareAndSet(false, true))
                {
                    ContextFactory.initConversationContext(null);
                    //Throw Busy exception
                    throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation");
                }
                else
                {
                    ConversationContext conversationContext = conversationManager.getConversationContext(conversation);
                    ContextFactory.initConversationContext(conversationContext);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.webbeans.conversation.ConversationManager

        {
            logger.debug("Destroying a session with session id : [{0}]", event.getSession().getId());
        }
        this.lifeCycle.getContextService().endContext(SessionScoped.class, event.getSession());

        ConversationManager conversationManager = ConversationManager.getInstance();
        conversationManager.destroyConversationContextWithSessionId(event.getSession().getId());
    }
View Full Code Here

Examples of org.apache.webbeans.conversation.ConversationManager

        }
       
        if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE) ||
                JSFUtil.getCurrentFacesContext().getResponseComplete())
        {
            ConversationManager conversationManager = ConversationManager.getInstance();
            Conversation conversation = conversationManager.getConversationBeanReference();

            if (conversation.isTransient())
            {
                logger.debug("Destroying the conversation context with cid : [{0}]", conversation.getId());
                ContextFactory.destroyConversationContext();                                                   
View Full Code Here

Examples of org.apache.webbeans.conversation.ConversationManager

        if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW))
        {
            //It looks for cid parameter in the JSF request.
            //If request contains cid, then it must restore conversation
            //Otherwise create NonexistentException
            ConversationManager conversationManager = ConversationManager.getInstance();
            Conversation conversation = conversationManager.getConversationBeanReference();
            String cid = JSFUtil.getConversationId();

            if (conversation.isTransient())
            {
                logger.debug("Creating a new transitional conversation with cid : [{0}]", conversation.getId());
                ContextFactory.initConversationContext(null);

                //Not restore, throw exception
                if(cid != null && !cid.equals(""))
                {
                    throw new NonexistentConversationException("Propogated conversation with cid=" + cid + " is not restored. It creates a new transient conversation.");
                }
            }
            else
            {
                logger.debug("Restoring conversation with cid : [{0}]", conversation.getId());

                //Conversation must be used by one thread at a time
                ConversationImpl owbConversation = (ConversationImpl)conversation;
                if(!owbConversation.getInUsed().compareAndSet(false, true))
                {
                    ContextFactory.initConversationContext(null);
                    //Throw Busy exception
                    throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation");
                }
                else
                {
                    ConversationContext conversationContext = conversationManager.getConversationContext(conversation);
                    ContextFactory.initConversationContext(conversationContext);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.webbeans.jsf.ConversationManager

    public void sessionEnded(HttpSessionEvent event)
    {
        logger.info("Destroying of the Session Context with session id : " + event.getSession().getId());
        ContextFactory.destroySessionContext(event.getSession());

        ConversationManager conversationManager = ConversationManager.getInstance();
        conversationManager.destroyConversationContextWithSessionId(event.getSession().getId());
    }
View Full Code Here

Examples of org.apache.ws.sandbox.security.conversation.ConversationManager

                        true);
                WSSecurityUtil.appendChildElement(
                    doc,
                    securityHeader,
                    (new SecurityContextToken(doc, uuid)).getElement());
                ConversationManager manager = new ConversationManager();
                for (int i = 0; i < this.actionsInt.length; i++) {
                    // Derrive the token
                    DerivedKeyInfo dkInfo =
                        manager.createDerivedKeyToken(doc, uuid, dkcbHandler,null, keyLen);

                    String genID = dkInfo.getId();
                    SecurityTokenReference stRef =
                        dkInfo.getSecTokRef2DkToken();
                    if (actionsInt[i] == ConversationConstants.DK_ENCRYPT) {
                        manager.performDK_ENCR(
                            ConversationUtil.generateIdentifier(uuid, genID),
                            "",
                            true,
                            doc,
                            stRef,
                            dkcbHandler, null,(String)this.configurator.get(ConvHandlerConstants.DK_ENC_ALGO));
                    } else if(actionsInt[i]==ConversationConstants.DK_SIGN){
                      //TODO:
                        manager.performDK_Sign(doc, dkcbHandler, uuid, dkInfo, null);
                    }
                   
                    manager.addDkToken(doc,dkInfo);

                }
            } catch (ConversationException e1) {
                e1.printStackTrace();
                throw new AxisFault(
View Full Code Here

Examples of org.apache.ws.security.conversation.ConversationManager

                        true);
                WSSecurityUtil.appendChildElement(
                    doc,
                    securityHeader,
                    (new SecurityContextToken(doc, uuid)).getElement());
                ConversationManager manager = new ConversationManager();
                for (int i = 0; i < this.actionsInt.length; i++) {
                    // Derrive the token
                    DerivedKeyInfo dkInfo =
                        manager.createDerivedKeyToken(doc, uuid, dkcbHandler,null, keyLen);

                    String genID = dkInfo.getId();
                    SecurityTokenReference stRef =
                        dkInfo.getSecTokRef2DkToken();
                    if (actionsInt[i] == ConversationConstants.DK_ENCRYPT) {
                        manager.performDK_ENCR(
                            ConversationUtil.generateIdentifier(uuid, genID),
                            "",
                            true,
                            doc,
                            stRef,
                            dkcbHandler, null,(String)this.configurator.get(ConvHandlerConstants.DK_ENC_ALGO));
                    } else if(actionsInt[i]==ConversationConstants.DK_SIGN){
                      //TODO:
                        manager.performDK_Sign(doc, dkcbHandler, uuid, dkInfo, null);
                    }
                   
                    manager.addDkToken(doc,dkInfo);

                }
            } catch (ConversationException e1) {
                e1.printStackTrace();
                throw new AxisFault(
View Full Code Here

Examples of org.drools.grid.io.ConversationManager

                                         8000 ),
                  accHandler,
                  l );


        ConversationManager cm = new ConversationManagerImpl( new GridImpl("peer"),
                                                              l );

        Conversation cv = cm.startConversation( "s1",
                                                new InetSocketAddress( "127.0.0.1",
                                                                       8000 ),
                                                                       "r1" );

        BlockingMessageResponseHandler blockHandler = new BlockingMessageResponseHandler();
View Full Code Here

Examples of org.jivesoftware.openfire.archive.ConversationManager

    }

    public void run() {
        MonitoringPlugin plugin = (MonitoringPlugin) XMPPServer.getInstance().getPluginManager().getPlugin(
            "monitoring");
        ConversationManager conversationManager = (ConversationManager)plugin.getModule(ConversationManager.class);
        conversations = conversationManager.getConversations();
    }
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.