Package org.hornetq.api.core.client

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


      // if strictUpdate == true, this will simulate a crash, where the server is stopped without closing/rolling back
      // the session
      if (!strictUpdate)
      {
         // If non Strict, at least rollback/cancel should still update the delivery-counts
         session.rollback(true);

         session.close();
      }

      server.stop();
View Full Code Here


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

      factory.close();
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((long)location), message.getBodyBuffer().readByte());
               }
               message.acknowledge();
            }

            session.rollback();

            cons.close();

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

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

      session.end(xid, XAResource.TMSUCCESS);
      session.prepare(xid);
      System.out.println("crashing session");
      crash(false, session);

      session.rollback(xid);

      ClientConsumer consumer = session.createConsumer(FailoverTestBase.ADDRESS);
      session.start();

      ClientMessage m = consumer.receive(1000);
View Full Code Here

           
            ClientMessage msg = consumer.receive(500);
            msg.getBodyBuffer().readByte();
            assertNotNull(msg);
            msg.acknowledge();
            session.rollback();
         }
        
        
         for (int i = 0 ; i < numberOfMessages; i++)
         {
View Full Code Here

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

         server.stop(false);
         server.start();
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

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.