Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQQueue


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

    protected Destination createDestination(String destinationName) {
        return new ActiveMQQueue(destinationName);
    }
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

    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(admins.length, 1);
       
        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(admins.length, 0);
    }
View Full Code Here

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

    ArrayList list = new ArrayList();
    for (int i = 0; i < names.length; i++) {
      DestinationSecurityConfig config = new DestinationSecurityConfig();
      config.setBrokerName( brokerSecurityConfig.getBrokerName() );
      if( "queue".equals(type) ) {
        config.setDestination(new ActiveMQQueue(dest));
      } else {
        config.setDestination(new ActiveMQTopic(dest));
      }
      list.add(config);     
    }   
View Full Code Here

        answer.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
        answer.setJMSDestination(new ActiveMQTopic("FOO.BAR"));
        answer.setJMSExpiration(1234);
        answer.setJMSMessageID("message:123");
        answer.setJMSPriority(2);
        answer.setJMSReplyTo(new ActiveMQQueue("BAR.REPLY"));
        answer.setJMSType("Cheddar");
        answer.setProducerID("myProducerID");
        answer.setStringProperty("fooString", "Whatnot");
        answer.setTransactionId("myTxnID");
    }
View Full Code Here

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

                workers.returnObject(new InboundEndpointWork((ActiveMQSession) session, endpoint, workers));
            }

            Destination dest = null;
            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 {
View Full Code Here

    protected QueueMessageContainer getQueueMessageContainer() {
        return (QueueMessageContainer) container;
    }

    protected ActiveMQDestination createDestination() {
        return new ActiveMQQueue(getSubject());
    }
View Full Code Here

TOP

Related Classes of org.codehaus.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.