Package org.activemq.message

Examples of org.activemq.message.ActiveMQQueue


        subscribeToQueue(exporter, getDestinationName());

        pfb = new JmsProxyFactoryBean();
        pfb.setServiceInterface(ITestBean.class);
        pfb.setConnectionFactory(connectionFactory);
        pfb.setDestination(new ActiveMQQueue(getDestinationName()));
        configure(pfb);

        ITestBean proxy = (ITestBean) pfb.getObject();
        assertEquals("myname", proxy.getName());
        assertEquals(99, proxy.getAge());
View Full Code Here


     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        System.out.println("Connecting to JMS server.");
        factory = new ActiveMQConnectionFactory("tcp://localhost:61616");
        Destination inQueue = new ActiveMQQueue("demo.org.servicemix.source");
        Destination outQueue = new ActiveMQQueue("demo.org.servicemix.output");
        requestor = MultiplexingRequestor.newInstance(factory, new JmsProducerConfig(), inQueue, outQueue);
       
        if (args.length == 0) {
            new JMSClient().run();
        } else {
View Full Code Here

        };

        asWrapper.activate(messageEndpointFactory);

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer producer = session.createProducer(new ActiveMQQueue("TEST"));
        producer.send(session.createTextMessage("Hello"));

        assertTrue(messageDelivered.attempt(1000 * 5));
    }
View Full Code Here

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

    protected ActiveMQDestination readDestination(DataInput dataIn) throws IOException {
        int data = dataIn.readByte();
        String text = readString(dataIn);
        switch (data) {
            case ActiveMQDestination.ACTIVEMQ_QUEUE:
                return new ActiveMQQueue(text);

            case ActiveMQDestination.ACTIVEMQ_TEMPORARY_QUEUE:
                return new ActiveMQTemporaryQueue(text);

            case ActiveMQDestination.ACTIVEMQ_TEMPORARY_TOPIC:
View Full Code Here

    public void testDynamicallyGrowing() throws Exception {
        Object answer = context.lookup("dynamicQueues/FOO.BAR");
        assertTrue("Should have found a queue but found: " + answer, answer instanceof ActiveMQQueue);

        ActiveMQQueue queue = (ActiveMQQueue) answer;
        assertEquals("queue name", "FOO.BAR", queue.getPhysicalName());

         answer = context.lookup("dynamicTopics/A.B.C");
        assertTrue("Should have found a topic but found: " + answer, answer instanceof ActiveMQTopic);

        ActiveMQTopic topic = (ActiveMQTopic) answer;
View Full Code Here

            data.put("destinations", broker.getDestinationContext(environment));
        }

        data.put("dynamicQueues", new LazyCreateContext() {
            protected Object createEntry(String name) {
                return new ActiveMQQueue(name);
            }
        });
        data.put("dynamicTopics", new LazyCreateContext() {
            protected Object createEntry(String name) {
                return new ActiveMQTopic(name);
View Full Code Here

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

        String subject = getClass().getName();
        if (isTopic) {
            return new ActiveMQTopic(subject);
        }
        else {
            return new ActiveMQQueue(subject);
        }
    }
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 = new VMMessageStore();
            if( transactionStore !=null ) {
                rc = transactionStore.proxy(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.