Package net.timewalker.ffmq3.common.destination

Examples of net.timewalker.ffmq3.common.destination.QueueRef


     * (non-Javadoc)
     * @see javax.jms.Session#createQueue(java.lang.String)
     */
    public Queue createQueue(String queueName) throws JMSException
    {
        return new QueueRef(queueName);
    }
View Full Code Here


       
        if (TestUtils.USE_EXTERNAL_SERVER)
        {
          queue1 = new QueueRef("TEST1");
            queue2 = new QueueRef("TEST2");
            topic1 = new TopicRef("TEST1");
            topic2 = new TopicRef("TEST2");
           
            // Purge queues first
            Connection connection = createQueueConnection();
            Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
            MessageConsumer consumer = session.createConsumer(queue1);
View Full Code Here

    private void singleTopicConnectionReceiverTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
      TopicConnection connection = null;
      try
      {
          Topic topic = new TopicRef(params.destinationName);
         
          SynchronizationPoint startSynchro = new SynchronizationPoint();
          connection = createTopicConnection();
         
          // Start receivers
View Full Code Here

      }
    }
   
    protected void singleTopicConnectionListenerTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection connection = createTopicConnection();

        // Start receivers
View Full Code Here

        }
    }
   
    protected void multiTopicConnectionReceiverTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection[] receiverConnections = new TopicConnection[params.receiverCount];
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n] = createTopicConnection();
View Full Code Here

        }
    }
   
    protected void multiTopicConnectionListenerTest( String testName , CommTestParameters params , DummyMessageFactory msgFactory ) throws Exception
    {
        Topic topic = new TopicRef(params.destinationName);
       
        SynchronizationPoint startSynchro = new SynchronizationPoint();
        TopicConnection[] receiverConnections = new TopicConnection[params.receiverCount];
        for (int n = 0 ; n < receiverConnections.length ; n++)
            receiverConnections[n] = createTopicConnection();
View Full Code Here

          if (timeout == 0)
          {
            if (!connection.isStarted())
              return null;
           
            AbstractMessage message = localQueue.get((LocalSession)session,
                                   transactionSet,
                                                 selector);         
              if (message == null)
                return null;
             
            if (traceEnabled)
                  log.trace(session+" [GET] in "+localQueue+" - "+message);
 
            if (duplicateRequired)
              message = MessageTools.duplicate(message);
              message.markAsReadOnly();
             
              return message;
          }
   
          // Wait loop
          long now = System.currentTimeMillis();
          long startTime = now;
         
          // Passive wait
          while (!closed && (timeout < 0 || (now - startTime < timeout)))
          {
            // Don't do anything if connection is not started
          if (connection.isStarted())
          {
                  // Try obtaining something from target queue
            AbstractMessage message = localQueue.get((LocalSession)session,
                                                 transactionSet,
                                                 selector);
                if (message != null)
                {
                    if (traceEnabled)
                        log.trace(session+" [GET] in "+localQueue+" - "+message);
                   
                    if (duplicateRequired)
                  message = MessageTools.duplicate(message);
                  message.markAsReadOnly();
                 
                  return message;
                }
          }
             
View Full Code Here

        synchronized (this)
      {
            // Push up to 'prefetchCapacity' messages to the remote consumer
          while (prefetchCapacity > 0)
          {         
            AbstractMessage message = receiveFromDestination(0, false);
            if (message != null)
            {
                count++;
              prefetchCapacity--;
              notificationProxy.addNotification(id,message,prefetchCapacity);
View Full Code Here

        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
View Full Code Here

    }
   
    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

TOP

Related Classes of net.timewalker.ffmq3.common.destination.QueueRef

Copyright © 2018 www.massapicom. 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.