Package org.hornetq.api.core.client

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


               }
               message.acknowledge();
            }
            if (rep == 0)
            {
               session.rollback();
               session.close();
               sf.close();
               server.stop();
               server.start();
            }
View Full Code Here


         session.start();

         ClientMessage msg = cons.receive(5000);
         assertNotNull(msg);
         msg.acknowledge();
         session.rollback();

         server.stop();

         // rename the file, simulating old behaviour
         long messageID = msg.getMessageID();
View Full Code Here

               {
                  assertEquals(getSamplebyte(countByte), clientMessage.getBodyBuffer().readByte());
               }
               clientMessage.acknowledge();
            }
            session.rollback();
         }

         server.stop(false);
         server.start();
View Full Code Here

      ClientConsumer consumerRollback = session
            .createConsumer(LargeMessageTest.ADDRESS);
      ClientMessage msg1 = consumerRollback.receive(1000);
      Assert.assertNotNull(msg1);
      msg1.acknowledge();
      session.rollback();
      consumerRollback.close();

      msg1 = consumer.receive(10000);

      Assert.assertNotNull(msg1);
View Full Code Here

         if (i % 100 == 0)
         {
            expectedCount++;
            msg.acknowledge();
            session.rollback();
         }
         session.close();
      }

      factory.close();
View Full Code Here

            {
               session.commit();
            }
            else
            {
               session.rollback();
            }

            session.close();
            sf.close();
         }
View Full Code Here

            {
               session.commit();
            }
            else
            {
               session.rollback();
            }

            session.close();
            sf.close();
View Full Code Here

         server.start();

         sf = locator.createSessionFactory();

         session = sf.createSession(true, false, false);
         session.rollback(xid2);

         sf.close();

         server.stop();
         server.start();
View Full Code Here

            Assert.assertEquals(Integer.toString(i), getTextMessage(msg));

            // No ACK done, so deliveryCount should be always = 1
            Assert.assertEquals(1, msg.getDeliveryCount());
         }
         session.rollback();
      }

      if (persistent)
      {
         session.close();
View Full Code Here

               session.start();
               consumer = session.createConsumer(ADDRESS);
            }
            else
            {
               session.rollback();
            }
         }
      }

      session.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.