Package javax.jms

Examples of javax.jms.XAConnectionFactory.createXAConnection()


    setParameters(factory);
   
    ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);

    try {
      cnx = factory.createXAConnection(userName, password);

      if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG))
        AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG,
                                      this + " createManagedConnection cnx = " + cnx);
    } catch (IllegalStateException exc) {
View Full Code Here


           
            XAConnectionFactory connectionFactory = (XAConnectionFactory)obj;
           
            if (username == null)
            {
               conn = connectionFactory.createXAConnection();
            }
            else
            {
               conn = connectionFactory.createXAConnection(username, password);
            }
View Full Code Here

            {
               conn = connectionFactory.createXAConnection();
            }
            else
            {
               conn = connectionFactory.createXAConnection(username, password);
            }
           
            XASession session = conn.createXASession();
           
            res = session.getXAResource();
View Full Code Here

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

         // send a message to the queue using an XASession that's not enlisted in a global tx

         XAConnectionFactory xcf = (XAConnectionFactory)cf;

         XAConnection xconn = xcf.createXAConnection();

         XASession xs = xconn.createXASession();

         MessageProducer p = xs.createProducer(queue1);
         Message m = xs.createTextMessage("one");
View Full Code Here

         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

        super(targetConnectionFactory);
    }

    protected Connection doCreateConnection() throws JMSException {
        XAConnectionFactory xcf = (XAConnectionFactory)getTargetConnectionFactory();
        return xcf.createXAConnection();
    }
   
    protected Session getSession(Connection con, Integer mode) throws JMSException {
        XAConnection xac = (XAConnection)con;
        return xac.createXASession();
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.