Package javax.jms

Examples of javax.jms.XAConnectionFactory.createXAConnection()


         assertEquals(1, count.intValue());

         // using XA with a ConnectionConsumer (testing the transaction behavior under MDBs)

         XAConnectionFactory xacf = (XAConnectionFactory)cf;
         xaconn = xacf.createXAConnection();
         xaconn.start();
         XASession xasession = xaconn.createXASession();
         DummyListener listener = new DummyListener();
         xasession.setMessageListener(listener);
View Full Code Here


         ObjectName queueMBean = new ObjectName("jboss.messaging.destination:service=Queue,name=Queue1");
         Integer count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
         assertEquals(1, count.intValue());

         XAConnectionFactory xcf = (XAConnectionFactory)cf;
         XAConnection xconn = xcf.createXAConnection();
         xconn.start();

         // no active JTA transaction here

         XASession xs = xconn.createXASession();
View Full Code Here

         Transaction trans = tm.getTransaction();

         XAConnectionFactory xacf = (XAConnectionFactory)cf;

         xaconn = xacf.createXAConnection();

         xaconn.start();

         XASession xasession = xaconn.createXASession();
View Full Code Here

         Integer count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");
         assertEquals(2, count.intValue());

         XAConnectionFactory xacf = (XAConnectionFactory)cf;

         xaconn = xacf.createXAConnection();

         xaconn.start();

         XASession xasession = xaconn.createXASession();
View Full Code Here

        log.debug("Attempting to create connection with user " + user);
        Connection result;
        if (preliminaryObject instanceof XAConnectionFactory && isDeliveryTransacted) {
            XAConnectionFactory xagcf = (XAConnectionFactory) preliminaryObject;
            if (user != null) {
                result = xagcf.createXAConnection(user, pass);
            } else {
                result = xagcf.createXAConnection();
            }
        } else {
           ConnectionFactory gcf = (ConnectionFactory) preliminaryObject;
View Full Code Here

        if (preliminaryObject instanceof XAConnectionFactory && isDeliveryTransacted) {
            XAConnectionFactory xagcf = (XAConnectionFactory) preliminaryObject;
            if (user != null) {
                result = xagcf.createXAConnection(user, pass);
            } else {
                result = xagcf.createXAConnection();
            }
        } else {
           ConnectionFactory gcf = (ConnectionFactory) preliminaryObject;
            if (user != null) {
                result = gcf.createConnection(user, pass);
View Full Code Here

                if (mcf.getProperties().getType() == JmsConnectionFactory.QUEUE) {
                    connection = ((XAQueueConnectionFactory)qFactory).createXAQueueConnection(username, password);
                } else if (mcf.getProperties().getType() == JmsConnectionFactory.TOPIC) {
                    connection = ((XATopicConnectionFactory)qFactory).createXATopicConnection(username, password);
                } else {
                    connection = qFactory.createXAConnection(username, password);
                }
            } else {
                if (mcf.getProperties().getType() == JmsConnectionFactory.QUEUE) {
                    connection = ((XAQueueConnectionFactory)qFactory).createXAQueueConnection();
                } else if (mcf.getProperties().getType() == JmsConnectionFactory.TOPIC) {
View Full Code Here

                if (mcf.getProperties().getType() == JmsConnectionFactory.QUEUE) {
                    connection = ((XAQueueConnectionFactory)qFactory).createXAQueueConnection();
                } else if (mcf.getProperties().getType() == JmsConnectionFactory.TOPIC) {
                    connection = ((XATopicConnectionFactory)qFactory).createXATopicConnection();
                } else {
                    connection = qFactory.createXAConnection();
                }
            }

            log.debug("created XAConnection: " + connection);
        } else if (factory instanceof ConnectionFactory) {
View Full Code Here

        log.debug("Attempting to create connection with user " + user);
        Connection result;
        if (preliminaryObject instanceof XAConnectionFactory && isDeliveryTransacted) {
            XAConnectionFactory xagcf = (XAConnectionFactory) preliminaryObject;
            if (user != null) {
                result = xagcf.createXAConnection(user, pass);
            } else {
                result = xagcf.createXAConnection();
            }
        } else {
           ConnectionFactory gcf = (ConnectionFactory) preliminaryObject;
View Full Code Here

        if (preliminaryObject instanceof XAConnectionFactory && isDeliveryTransacted) {
            XAConnectionFactory xagcf = (XAConnectionFactory) preliminaryObject;
            if (user != null) {
                result = xagcf.createXAConnection(user, pass);
            } else {
                result = xagcf.createXAConnection();
            }
        } else {
           ConnectionFactory gcf = (ConnectionFactory) preliminaryObject;
            if (user != null) {
                result = gcf.createConnection(user, pass);
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.