Package org.activemq.message

Examples of org.activemq.message.ActiveMQQueue


        }
        return rc;
    }

    public TopicMessageStore createTopicMessageStore(String destinationName) throws JMSException {
        ActiveMQQueue dest = new ActiveMQQueue(destinationName);
        TopicMessageStore rc = (TopicMessageStore)destinations.get(dest);
        if(rc==null) {
            rc = new VMTopicMessageStore();
            if( transactionStore !=null ) {
                rc = transactionStore.proxy(rc);
View Full Code Here


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

     * @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

        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

            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
View Full Code Here

            }
        };

        ActiveMQActivationSpec activationSpec = endpointActivationKey.getActivationSpec();
        if ("javax.jms.Queue".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQQueue(activationSpec.getDestination());
        } else if ("javax.jms.Topic".equals(activationSpec.getDestinationType())) {
            dest = new ActiveMQTopic(activationSpec.getDestination());
        } else {
            throw new ResourceException("Unknown destination type: " + activationSpec.getDestinationType());
        }
View Full Code Here

        broker.start();
        connectionFactory = new ActiveMQConnectionFactory(broker, "tcp://localhost:61616");
//        connectionFactory.setTurboBoost(true);
//        connectionFactory.setCachingEnabled(false);
//        connectionFactory.setCopyMessageOnSend(true);
        dest = new ActiveMQQueue("TEST");
    }
View Full Code Here

    public ActiveMQDestination createDestination() {
        ActiveMQDestination dest = null;
        if (isValidDestinationType() && isValidDestination()) {
            if (Queue.class.getName().equals(destinationType)) {
                dest = new ActiveMQQueue(destination);
            } else if (Topic.class.getName().equals(destinationType)) {
                dest = new ActiveMQTopic(destination);
            } else {
                assert false : "Execution should never reach here";
            }
View Full Code Here

            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
View Full Code Here

        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");

        factory.setUseEmbeddedBroker(true);
        connection = factory.createConnection();
        queue = new ActiveMQQueue(getClass().getName() + "." + getName());

        producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        consumerSession = connection.createSession(true, 0);

        producer = producerSession.createProducer(queue);
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.