Package net.timewalker.ffmq3.local.destination

Examples of net.timewalker.ffmq3.local.destination.LocalQueue


            {
              List queues = new ArrayList();
              queues.addAll(queueMap.values());
              for (int i = 0; i < queues.size(); i++)
        {
                    LocalQueue localQueue = (LocalQueue)queues.get(i);
                    try
                    {
                      undeployQueue(localQueue);
                    }
                    catch (JMSException e)
View Full Code Here


     */
    public void deleteQueue( String queueName , boolean force ) throws JMSException
    {
        synchronized (queueMap)
        {
            LocalQueue queue = (LocalQueue)queueMap.get(queueName);
            if (queue != null)
            {
                undeployQueue(queue);
                log.debug("Undeployed local queue : "+queueName);
            }
View Full Code Here

     */
    public LocalQueue getLocalQueue( String queueName ) throws JMSException
    {
        synchronized (queueMap)
        {
            LocalQueue queue = (LocalQueue)queueMap.get(queueName);
            if (queue == null)
                return loadOrAutoCreateQueue(queueName);
           
            return queue;
        }
View Full Code Here

     */
    public boolean localQueueExists( String queueName ) throws JMSException
    {
        synchronized (queueMap)
        {
            LocalQueue queue = (LocalQueue)queueMap.get(queueName);
            if (queue != null)
                return true;
               
            // Check if a definition exists
            if (destinationDefinitionProvider.getQueueDefinition(queueName) != null)
View Full Code Here

    private LocalQueue loadOrAutoCreateQueue( String queueName ) throws JMSException
    {
        QueueDefinition queueDef = destinationDefinitionProvider.getQueueDefinition(queueName);
        if (queueDef != null)
        {
            LocalQueue queue = new LocalQueue(this,queueDef);
            deployQueue(queue);
            return queue;
        }
       
        // Queue auto-creation
View Full Code Here

    Destination destination = message.getJMSDestination();
   
    if (destination instanceof Queue)
    {
      Queue queueRef = (Queue)destination;
      LocalQueue queue = engine.getLocalQueue(queueRef.getQueueName());
      if (queue.put(message))
        if (committables != null)
          committables.add(queue);
    }
    else
    if (destination instanceof Topic)
View Full Code Here

    Destination destination = message.getJMSDestination();
   
    if (destination instanceof Queue)
    {
      Queue queueRef = (Queue)destination;
      LocalQueue queue = engine.getLocalQueue(queueRef.getQueueName());
      if (queue.putLocked(message, locks))
        committables.add(queue);
    }
    else
      throw new InvalidDestinationException("Unsupported destination : "+destination);
    }
View Full Code Here

        consumedCount += items.length;
       
        List updatedQueues = computeUpdatedQueues(items);
            for (int i = 0; i < updatedQueues.size(); i++)
            {
                LocalQueue localQueue = (LocalQueue)updatedQueues.get(i);
                if (localQueue.remove(this,items))
                  committables.add(localQueue);
            }
      }
     
      // Commit destinations
View Full Code Here

      }
     
      List updatedQueues = computeUpdatedQueues(items);
        for (int i = 0; i < updatedQueues.size(); i++)
      {
        LocalQueue localQueue = (LocalQueue)updatedQueues.get(i);
        if (localQueue.redeliver(this,items))
          committableDestinations.add(localQueue);
      }
       
        // Commit destinations
        commitChanges(committableDestinations);
View Full Code Here

    private List computeUpdatedQueues( TransactionItem[] items )
    {
        List updatedQueues = new ArrayList(Math.max(items.length,16));
        for (int i = 0 ; i < items.length ; i++)
        {
            LocalQueue localQueue = items[i].getDestination();
            if (!updatedQueues.contains(localQueue))
                updatedQueues.add(localQueue);
        }
        return updatedQueues;
    }
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.local.destination.LocalQueue

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.