Package javax.jms

Examples of javax.jms.XASession.createConsumer()


         prod4.send(tm13);
         prod4.send(tm14);
         prod4.send(tm15);
         prod4.send(tm16);

         MessageConsumer cons1 = sess2.createConsumer(HornetQServerTestCase.queue2);

         TextMessage rm1 = (TextMessage)cons1.receive(1000);
         ProxyAssertSupport.assertNotNull(rm1);
         ProxyAssertSupport.assertEquals(tm1.getText(), rm1.getText());
View Full Code Here


         Message m = cons1.receive(1000);

         ProxyAssertSupport.assertNull(m);

         MessageConsumer cons2 = sess2.createConsumer(HornetQServerTestCase.queue3);

         TextMessage rm5 = (TextMessage)cons2.receive(1000);
         ProxyAssertSupport.assertNotNull(rm5);
         ProxyAssertSupport.assertEquals(tm5.getText(), rm5.getText());
View Full Code Here

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

         res1.start(xid1, XAResource.TMNOFLAGS);

         MessageConsumer cons = sess2.createConsumer(HornetQServerTestCase.queue4);

         conn2.start();

         // Consume the message
View Full Code Here

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

         res1.start(xid1, XAResource.TMNOFLAGS);

         MessageConsumer cons = sess2.createConsumer(HornetQServerTestCase.queue4);

         conn2.start();

         // Consume the message
View Full Code Here

         prod4.send(tm13);
         prod4.send(tm14);
         prod4.send(tm15);
         prod4.send(tm16);

         MessageConsumer cons1 = sess2.createConsumer(HornetQServerTestCase.queue2);

         TextMessage rm1 = (TextMessage)cons1.receive(1000);
         ProxyAssertSupport.assertNotNull(rm1);
         ProxyAssertSupport.assertEquals(tm1.getText(), rm1.getText());
View Full Code Here

         Message m = cons1.receive(1000);

         ProxyAssertSupport.assertNull(m);

         MessageConsumer cons2 = sess2.createConsumer(HornetQServerTestCase.queue3);

         TextMessage rm5 = (TextMessage)cons2.receive(1000);
         ProxyAssertSupport.assertNotNull(rm5);
         ProxyAssertSupport.assertEquals(tm5.getText(), rm5.getText());
View Full Code Here

         producer.send(tm);

         xaConn = ((XAConnectionFactory)getXAConnectionFactory()).createXAConnection();

         XASession consumerSess = xaConn.createXASession();
         MessageConsumer consumer = consumerSess.createConsumer(HornetQServerTestCase.queue1);
         xaConn.start();

         DummyXAResource res = new DummyXAResource();

         mgr.begin();
View Full Code Here

         consumerSess.close();

         consumerSess = xaConn.createXASession();

         consumer = consumerSess.createConsumer(HornetQServerTestCase.queue1);

         mgr.begin();

         tx = mgr.getTransaction();
View Full Code Here

        resource.end(tid, XAResource.TMSUCCESS);
        resource.commit(tid, true);
        session.close();
       
        session = connection1.createXASession();
        MessageConsumer consumer = session.createConsumer(dest);
        tid = createXid();
        resource = session.getXAResource();
        resource.start(tid, XAResource.TMNOFLAGS);
        TextMessage receivedMessage = (TextMessage) consumer.receive(1000);
        assertNotNull(receivedMessage);
View Full Code Here

        resource.end(tid, XAResource.TMSUCCESS);
        resource.commit(tid, true);
        session.close();
       
        session = connection1.createXASession();
        MessageConsumer consumer = session.createConsumer(dest);
        tid = createXid();
        resource = session.getXAResource();
        resource.start(tid, XAResource.TMNOFLAGS);
        TextMessage receivedMessage = (TextMessage) consumer.receive(1000);
        consumer.close();
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.