Package org.hornetq.api.core.client

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


      sess.stop();

      sess.start();

      sess.stop();

      ClientConsumer consumer = sess.createConsumer(new SimpleString(threadNum + MultiThreadRandomReattachTestBase.ADDRESS.toString()));

      ClientProducer producer = sess.createProducer(MultiThreadRandomReattachTestBase.ADDRESS);
View Full Code Here


      Assert.assertNotNull(message2);

      message2.acknowledge();

      sess.stop();

      sess.start();

      sess.close();
View Full Code Here

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

      ClientMessage msg = consumer.receive(1000);
      Assert.assertEquals(1, msg.getDeliveryCount());
      session.stop();

      // if strictUpdate == true, this will simulate a crash, where the server is stopped without closing/rolling back
      // the session
      if (!strictUpdate)
      {
View Full Code Here

      session.createQueue(ADDRESS, QUEUE, null, false);

      ClientConsumer consumer = session.createConsumer(QUEUE, null, false);
      session.start();

      session.stop();
      Assert.assertNull(consumer.receiveImmediate());

      session.start();
      long start = System.currentTimeMillis();
      ClientMessage msg = consumer.receive(2000);
View Full Code Here

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

      ClientMessage msg = consumer.receive(1000);
      Assert.assertEquals(1, msg.getDeliveryCount());
      session.stop();

      // if strictUpdate == true, this will simulate a crash, where the server is stopped without closing/rolling back
      // the session
      if (!strictUpdate)
      {
View Full Code Here

         msg.acknowledge();
      }
     
      assertTrue(queue.isDirectDeliver());
     
      session.stop();
     
      for (int i = 0; i < numMessages; i++)
      {
         msg = session.createMessage(true);
View Full Code Here

         msg.acknowledge();
      }
     
      assertTrue(queue.isDirectDeliver());
     
      session.stop();
     
      for (int i = 0; i < numMessages; i++)
      {
         msg = session.createMessage(true);
View Full Code Here

      session.createQueue(ADDRESS, QUEUE, null, false);

      ClientConsumer consumer = session.createConsumer(QUEUE, null, false);
      session.start();

      session.stop();
      Assert.assertNull(consumer.receiveImmediate());

      session.start();
      long start = System.currentTimeMillis();
      ClientMessage msg = consumer.receive(2000);
View Full Code Here

                    log.debug(String.format("found queue '%s' with %d messages. kept",
                        queues[i], msgCount));
                }
            }

            session.stop();
            session.close();
        }
        catch (HornetQException e) {
            log.error("Problem cleaning old message queues:", e);
            throw new RuntimeException(e);
View Full Code Here

                             false);

      ClientSession sess = sf.createSession(false, true, true);
      sess.addMetaData("data", RandomUtil.randomString());

      sess.stop();

      sess.start();

      sess.stop();
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.