Package org.jboss.jms.tx

Examples of org.jboss.jms.tx.MessagingXid


         XASession sess2 = conn2.createXASession();
  
         XAResource res1 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());
        
         res1.start(xid1, XAResource.TMNOFLAGS);
        
         MessageConsumer cons = sess2.createConsumer(queue4);
        
View Full Code Here


         XASession sess2 = conn2.createXASession();
  
         XAResource res1 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());
        
         res1.start(xid1, XAResource.TMNOFLAGS);
        
         MessageConsumer cons = sess2.createConsumer(queue4);
        
View Full Code Here

        
         XASession sess2 = conn2.createXASession();
        
         XAResource res = sess2.getXAResource();
        
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());
        
         res.start(xid1, XAResource.TMNOFLAGS);
        
         //Now send four more messages in a global tx
        
View Full Code Here

        
         XASession sess2 = conn2.createXASession();
        
         XAResource res = sess2.getXAResource();
        
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());
        
         res.start(xid1, XAResource.TMNOFLAGS);
        
         //Now send four more messages in a global tx
        
View Full Code Here

         XAResource res1 = sess1.getXAResource();
  
         XAResource res2 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());
         Xid xid2 = new MessagingXid("bq2".getBytes(), 42, "frigtard".getBytes());
  
         log.trace("Sending messages");
        
         //Send two messages in transaction 1
        
View Full Code Here

         XAResource res1 = sess1.getXAResource();
  
         XAResource res2 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "aapeli".getBytes());
         Xid xid2 = new MessagingXid("bq2".getBytes(), 42, "belsebub".getBytes());
  
         //    Send a message in each tx
  
         res1.start(xid1, XAResource.TMNOFLAGS);
  
View Full Code Here

         XAResource res1 = sess1.getXAResource();
  
         XAResource res2 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 123, "gbtxid1".getBytes());
         Xid xid2 = new MessagingXid("bq2".getBytes(), 124, "gbtxid2".getBytes());
  
         //    Send a message in each tx
  
         res1.start(xid1, XAResource.TMNOFLAGS);
  
View Full Code Here

         XAResource res1 = sess1.getXAResource();
  
         XAResource res2 = sess2.getXAResource();
  
         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 123, "gbtxid1".getBytes());
         Xid xid2 = new MessagingXid("bq2".getBytes(), 124, "gbtxid2".getBytes());
  
         //    Send a message in each tx
  
         res1.start(xid1, XAResource.TMNOFLAGS);
  
View Full Code Here

         XASession sess2 = conn2.createXASession();

         XAResource res1 = sess2.getXAResource();

         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("tx1".getBytes(), 42, "abcdef".getBytes());

         res1.start(xid1, XAResource.TMNOFLAGS);

         MessageConsumer cons = sess2.createConsumer(queue4);

         conn2.start();

         //Consume the message

         TextMessage rm1 = (TextMessage)cons.receive(1000);

         assertNotNull(rm1);

         assertEquals(tm1.getText(), rm1.getText());

         res1.end(xid1, XAResource.TMSUCCESS);

         //prepare the tx

         res1.prepare(xid1);

         conn1.close();

         conn2.close();

         conn1 = null;

         conn2 = null;

         //Now receive again

         conn3 = cf.createXAConnection();

         XASession sess3 = conn3.createXASession();

         XAResource res3 = sess3.getXAResource();
        
         Xid xid2 = new MessagingXid("tx2".getBytes(), 42, "ghijkl".getBytes());

         res3.start(xid2, XAResource.TMNOFLAGS);

         MessageConsumer cons3 = sess3.createConsumer(queue4);
View Full Code Here

         XASession sess2 = conn2.createXASession();

         XAResource res1 = sess2.getXAResource();

         //Pretend to be a transaction manager by interacting through the XAResources
         Xid xid1 = new MessagingXid("bq1".getBytes(), 42, "eemeli".getBytes());

         res1.start(xid1, XAResource.TMNOFLAGS);

         MessageConsumer cons = sess2.createConsumer(queue4);
View Full Code Here

TOP

Related Classes of org.jboss.jms.tx.MessagingXid

Copyright © 2018 www.massapicom. 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.