Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientSession.rollback()


            if (iteration == 0)
            {
               if (isXA)
               {
                  session.end(xid, XAResource.TMSUCCESS);
                  session.rollback(xid);
                  xid = newXID();
                  session.start(xid, XAResource.TMNOFLAGS);
               }
               else
               {
View Full Code Here


                  xid = newXID();
                  session.start(xid, XAResource.TMNOFLAGS);
               }
               else
               {
                  session.rollback();
               }
            }
            else
            {
               if (isXA)
View Full Code Here

         cp.send(clientSession.createMessage(false));
         cp.send(clientSession.createMessage(false));
         cp.send(clientSession.createMessage(false));
         Queue q = (Queue)server.getPostOffice().getBinding(new SimpleString(queueName)).getBindable();
         Assert.assertEquals(0, q.getMessageCount());
         clientSession.rollback();
         cp.send(clientSession.createMessage(false));
         cp.send(clientSession.createMessage(false));
         clientSession.commit();
         Assert.assertEquals(2, q.getMessageCount());
         clientSession.close();
View Full Code Here

      ClientProducer producer = sessSend.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.rollback();

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.commit();
View Full Code Here

      ClientProducer producer = sessSend.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.rollback();

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.commit();
View Full Code Here

      ClientProducer producer = sessSend.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.rollback();

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.commit();
View Full Code Here

      ClientProducer producer = sessSend.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.rollback();

      sendMessages(sessSend, producer, numMessages, threadNum);

      sessSend.commit();
View Full Code Here

            message.putIntProperty(new SimpleString("id"), i);

            producer.send(message);
         }

         session.rollback();

         ClientConsumer consumer = session.createConsumer(PagingTest.ADDRESS);

         session.start();
View Full Code Here

         Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
         Queue q = (Queue)server.getPostOffice().getBinding(queueA).getBindable();
         Assert.assertEquals(numMessages, q.getDeliveringCount());
         Assert.assertEquals(numMessages, q.getMessageCount());
         session.stop();
         session.rollback();
         Assert.assertEquals(0, q.getDeliveringCount());
         Assert.assertEquals(numMessages, q.getMessageCount());
         latch = new CountDownLatch(numMessages);
         cc.setMessageHandler(new ackHandler(session, latch));
         session.start();
View Full Code Here

            ClientMessage cm = c.receive(5000);
            Assert.assertNotNull(cm);
            cm.acknowledge();
            Assert.assertEquals(i, cm.getBodyBuffer().readInt());
         }
         sendSession.rollback();
         for (int i = 0; i < numMessages; i++)
         {
            ClientMessage cm = c.receive(5000);
            Assert.assertNotNull(cm);
            cm.acknowledge();
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.