Examples of LocalSession


Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new CreateSessionResponse();
    }
   
    private LocalSession lookupSession( AbstractSessionQuery query ) throws JMSException
    {
        LocalSession localSession = (LocalSession)getLocalConnection().lookupRegisteredSession(query.getSessionId());
        if (localSession == null)
            throw new FFMQException("Invalid session id : "+query.getSessionId(),"NETWORK_ERROR");
        return localSession;
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return localSession;
    }
   
    private LocalMessageConsumer lookupConsumer( AbstractConsumerQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
        LocalMessageConsumer consumer = (LocalMessageConsumer)localSession.lookupRegisteredConsumer(query.getConsumerId());
        if (consumer == null)
            throw new FFMQException("Invalid consumer id : "+query.getConsumerId(),"NETWORK_ERROR");
        return consumer;
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return consumer;
    }
   
    private LocalQueueBrowser lookupBrowser( AbstractQueueBrowserQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
        LocalQueueBrowser browser = (LocalQueueBrowser)localSession.lookupRegisteredBrowser(query.getBrowserId());
        if (browser == null)
            throw new FFMQException("Invalid browser id : "+query.getBrowserId(),"NETWORK_ERROR");
        return browser;
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new CloseSessionResponse();
    }
   
    private CommitResponse processCommit( CommitQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
       
        // Flush remaining messages first
        List messages = query.getMessages();
        if (messages != null)
        {
            // Dispatch to session
            for(int n=0;n<messages.size();n++)
            {
                AbstractMessage msg = (AbstractMessage)messages.get(n);
                localSession.dispatch(msg);
            }
        }
       
        // Commit session
        List deliveredMessageIDs = query.getDeliveredMessageIDs();
        localSession.commit(deliveredMessageIDs != null && !deliveredMessageIDs.isEmpty(),
                        deliveredMessageIDs);
       
        return new CommitResponse();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new CommitResponse();
    }
   
    private RollbackResponse processRollback( RollbackQuery query ) throws JMSException
    {
      LocalSession localSession = lookupSession(query);
      List deliveredMessageIDs = query.getDeliveredMessageIDs();
        localSession.rollback(deliveredMessageIDs != null && !deliveredMessageIDs.isEmpty(), deliveredMessageIDs);
       
        return new RollbackResponse();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return null; // Async call
    }
   
    private PutResponse processPut( PutQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        AbstractMessage msg = query.getMessage();
       
        // Dispatch to session
        session.dispatch(msg);
    
        return new PutResponse();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new PutResponse();
    }
   
    private MultiplePutResponse processMultiplePut( MultiplePutQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
       
        List messages = query.getMessages();
        if (messages != null)
        {
            // Dispatch to session
            for(int n=0;n<messages.size();n++)
            {
                AbstractMessage msg = (AbstractMessage)messages.get(n);
                session.dispatch(msg);
            }
        }
    
        return new MultiplePutResponse();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new MultiplePutResponse();
    }
   
    private AcknowledgeResponse processAcknowledge( AcknowledgeQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        session.acknowledge(query.getDeliveredMessageIDs());
       
        return new AcknowledgeResponse();
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return new AcknowledgeResponse();
    }
   
    private AbstractResponsePacket processAsyncAcknowledge( AsyncAcknowledgeQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        session.acknowledge(query.getDeliveredMessageIDs());
       
        return null;
    }
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession

        return null;
    }
   
    private RecoverResponse processRecover( RecoverQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        session.recover(query.getDeliveredMessageIDs());
       
        return new RecoverResponse();
    }
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.