Examples of ActiveMQQueue


Examples of org.apache.activemq.command.ActiveMQQueue

        String qName = "MyQueue";
        int timeout = 5;
        DefaultXidFactory xidFactory = new DefaultXidFactory();
        ActiveMQXAConnectionFactory xacf = new ActiveMQXAConnectionFactory();
        xacf.setBrokerURL(url);
        ActiveMQQueue queue = new ActiveMQQueue();
        queue.setPhysicalName(qName);
        XAConnection xaconn = xacf.createXAConnection();
        xaconn.start();
        XASession session = xaconn.createXASession();
        XAResource xares = session.getXAResource();
        MessageConsumer receiver = session.getSession().createConsumer(queue);
View Full Code Here

Examples of org.apache.activemq.command.ActiveMQQueue

            return null;
        }

        ActiveMQDestination dest = null;
        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

Examples of org.apache.activemq.command.ActiveMQQueue

            consumerLowPriority = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
            consumerHighPriority = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
            senderSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
            String queueName = getClass().getName();
            ActiveMQQueue low = new ActiveMQQueue(queueName+"?consumer.priority=1");
            MessageConsumer lowConsumer = consumerLowPriority.createConsumer(low);

            ActiveMQQueue high = new ActiveMQQueue(queueName+"?consumer.priority=2");
            MessageConsumer highConsumer = consumerLowPriority.createConsumer(high);

            ActiveMQQueue senderQueue = new ActiveMQQueue(queueName);

            MessageProducer producer = senderSession.createProducer(senderQueue);

            Message msg = senderSession.createTextMessage("test");
            for (int i =0; i< 10000;i++) {
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQQueue

            }
        };

        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
TOP
Copyright © 2018 www.massapi.com. 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.