Examples of createXAConnection()


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

Examples of javax.jms.XAConnectionFactory.createXAConnection()

         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

Examples of javax.jms.XAConnectionFactory.createXAConnection()

         Transaction trans = tm.getTransaction();

         XAConnectionFactory xacf = (XAConnectionFactory)cf;

         xaconn = xacf.createXAConnection();

         xaconn.start();

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

Examples of javax.jms.XAConnectionFactory.createXAConnection()

         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

Examples of javax.jms.XAConnectionFactory.createXAConnection()

     
      XAConnection conn = null;
     
      try
      {
         conn = cf.createXAConnection();
        
         Xid xid1, xid2;
        
         {
        
View Full Code Here

Examples of javax.jms.XAConnectionFactory.createXAConnection()

                    }
                   
                    if (isXAAware)
                    {
                        final XAConnectionFactory factory = (XAConnectionFactory)factoryConnection ;
                        jmsConnection = useJMSSecurity ? factory.createXAConnection(username,password): factory.createXAConnection();
                        freeSessionsMap.put(XA_TRANSACTED, new ArrayList<JmsSession>() );
                        inUseSessionsMap.put(XA_TRANSACTED, new ArrayList<JmsSession>() );
                    }
                    else if (factoryConnection instanceof ConnectionFactory)
                    {
View Full Code Here

Examples of javax.jms.XAConnectionFactory.createXAConnection()

                    }
                   
                    if (isXAAware)
                    {
                        final XAConnectionFactory factory = (XAConnectionFactory)factoryConnection ;
                        jmsConnection = useJMSSecurity ? factory.createXAConnection(username,password): factory.createXAConnection();
                        freeSessionsMap.put(XA_TRANSACTED, new ArrayList<JmsSession>() );
                        inUseSessionsMap.put(XA_TRANSACTED, new ArrayList<JmsSession>() );
                    }
                    else if (factoryConnection instanceof ConnectionFactory)
                    {
View Full Code Here

Examples of javax.jms.XAQueueConnectionFactory.createXAConnection()

                cnx = factory.createXAQueueConnection(userName, password);
              } else {
                XAConnectionFactory factory = XAHATcpConnectionFactory.create(ra.haURL);
                setParameters(factory);
                ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
                cnx = factory.createXAConnection(userName, password);
              }
            } else {         
              if (cxRequest instanceof QueueConnectionRequest) {
                XAQueueConnectionFactory factory = XAQueueHALocalConnectionFactory.create();
                setParameters(factory);
View Full Code Here

Examples of javax.jms.XAQueueConnectionFactory.createXAConnection()

                ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
                cnx = factory.createXAQueueConnection(userName, password);
              } else {
                XAConnectionFactory factory = XAHALocalConnectionFactory.create();
                setParameters(factory);
                cnx = factory.createXAConnection(userName, password);
              }
            }
          } else {
            String urlHa = "hajoram://" + hostName + ":" + serverPort;
            if (cxRequest instanceof QueueConnectionRequest) {
View Full Code Here

Examples of javax.jms.XAQueueConnectionFactory.createXAConnection()

              cnx = factory.createXAQueueConnection(userName, password);
            } else {
              XAConnectionFactory factory = XAHATcpConnectionFactory.create(urlHa);
              setParameters(factory);
              ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
              cnx = factory.createXAConnection(userName, password);
            }
          }
        } else {
            if (collocated) {
                if (cxRequest instanceof QueueConnectionRequest) {
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.