Package org.activemq.message

Examples of org.activemq.message.ActiveMQQueue


     * @throws JMSException if the session fails to create a queue due to some internal error.
     * @since 1.1
     */
    public Queue createQueue(String queueName) throws JMSException {
        checkClosed();
        return new ActiveMQQueue(queueName);
    }
View Full Code Here


        String subject = getClass().getName();
        if (isTopic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

        destinationMap.removeAll(dest);
    }

    public void sendToDeadLetterQueue(String deadLetterName, ActiveMQMessage message) throws JMSException {
       
        ActiveMQQueue destination = new ActiveMQQueue(deadLetterName);
        DurableQueueBoundedMessageContainer container = (DurableQueueBoundedMessageContainer) containers.get(destination);
        if (container == null) {
            container = createContainer(destination, true);
        }       
        container.enqueue(message);
View Full Code Here

    public void testCreateQueue() throws JMSException {
       
        // The broker should start with zero destinations.
        BrokerAdmin brokerAdmin = getBrokerAdmin();
        brokerAdmin.createMessageContainer(new ActiveMQQueue(TEST_QUEUE_NAME)  );
       
        MessageContainerAdmin[] admins = brokerAdmin.listMessageContainerAdmin();
        assertEquals(1, admins.length);
       
        assertEquals(admins[0].getDestinationName(), TEST_QUEUE_NAME);       
View Full Code Here

   
    public void testDeleteQueue() throws JMSException {
       
        // The broker should start with zero destinations.
        BrokerAdmin brokerAdmin = getBrokerAdmin();
        brokerAdmin.createMessageContainer(new ActiveMQQueue(TEST_QUEUE_NAME)  );
        brokerAdmin.destoryMessageContainer(new ActiveMQQueue(TEST_QUEUE_NAME)  );
       
        MessageContainerAdmin[] admins = brokerAdmin.listMessageContainerAdmin();
        assertEquals(0, admins.length);
    }
View Full Code Here

    /**
     * Factory method to create new Queue instances
     */
    protected Queue createQueue(String name) {
        return new ActiveMQQueue(name);
    }
View Full Code Here

    protected Destination createDestination(String subject) {
        if (topic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
View Full Code Here

            else {
                updateActiveSubscriptions(container, sub);
            }
        }
       
        ActiveMQDestination key = new ActiveMQQueue(destinationName);
        destinationMap.put(key, container);
        return container;
    }
View Full Code Here

        destinationMap.put(key, container);
        return container;
    }

    protected Destination createDestination(String destinationName) {
        return new ActiveMQQueue(destinationName);
    }
View Full Code Here

    public static VMPersistenceAdapter newInstance(File file) {
        return new VMPersistenceAdapter();
    }

    public MessageStore createQueueMessageStore(String destinationName) throws JMSException {
        ActiveMQQueue dest = new ActiveMQQueue(destinationName);
        MessageStore rc = (MessageStore)destinations.get(dest);
        if(rc==null) {
            rc = transactionStore.proxy(new VMMessageStore());
            destinations.put(dest, rc);
        }
View Full Code Here

TOP

Related Classes of org.activemq.message.ActiveMQQueue

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.