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

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

                    }
                   
                    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

                    }
                   
                    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

      XAConnectionFactory xaCF = (XAConnectionFactory)cf;

      try
      {
         // skip connection to node 0
         conn = xaCF.createXAConnection();
         conn.close();

         // create a connection to node 1
         conn = xaCF.createXAConnection();
         conn.start();
View Full Code Here

         // skip connection to node 0
         conn = xaCF.createXAConnection();
         conn.close();

         // create a connection to node 1
         conn = xaCF.createXAConnection();
         conn.start();

         assertEquals(1, ((JBossConnection)conn).getServerID());

         // register a failover listener
View Full Code Here

      Connection conn = null;
     
      try
      {
         // skip connection to node 0
         xaConn = xaCF.createXAConnection();
         xaConn.close();

         // create a connection to node 1
         xaConn = xaCF.createXAConnection();
        
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.