Package org.hornetq.api.core.client

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


                     if (i == 1000)
                     {
                        // The session is not TX, but we do this just to perform a round trip to the server
                        // and make sure there are no pending messages
                        sessionProducer.commit();

                        assertTrue(server.getPagingManager().getPageStore(ADDRESS).isPaging());
                        ready.countDown();
                     }
                  }
View Full Code Here


                        assertTrue(server.getPagingManager().getPageStore(ADDRESS).isPaging());
                        ready.countDown();
                     }
                  }

                  sessionProducer.commit();

                  log.info("Producer gone");

               }
               catch (Throwable e)
View Full Code Here

            producerA.send(msg);
            producerB.send(msg);
         }

         session.commit(); // commit was called to clean the buffer only (making sure everything is on the server side)

         Assert.assertTrue(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_A).isPaging());
         Assert.assertFalse(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_B).isPaging());

         for (int i = 0; i < NUMBER_MESSAGES_BEFORE_PAGING; i++)
View Full Code Here

            producerA.send(msg);
            producerB.send(msg);
         }

         session.commit(); // commit was called to clean the buffer only (making sure everything is on the server side)

         Assert.assertTrue(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_A).isPaging());
         Assert.assertTrue(server.getPostOffice().getPagingManager().getPageStore(PAGED_ADDRESS_B).isPaging());

         for (int i = NUMBER_MESSAGES_BEFORE_PAGING * 2; i < NUMBER_OF_MESSAGES; i++)
View Full Code Here

         for (int i = 0; i < NUMBER_OF_MESSAGES; i++)
         {
            ClientMessage msg = consumerB.receive(5000);
            Assert.assertNotNull(msg);
            msg.acknowledge();
            session.commit();
         }

         Assert.assertNull(consumerB.receiveImmediate());

         consumerB.close();
View Full Code Here

                     msg.acknowledge();

                     if (i % 20 == 0)
                     {
                        System.out.println("Commit consumer");
                        sessionConsumer.commit();
                     }
                  }
                  sessionConsumer.commit();
               }
               catch (Throwable e)
View Full Code Here

                     {
                        System.out.println("Commit consumer");
                        sessionConsumer.commit();
                     }
                  }
                  sessionConsumer.commit();
               }
               catch (Throwable e)
               {
                  e.printStackTrace();
                  errors.incrementAndGet();
View Full Code Here

            message.putIntProperty("id", i);

            producer.send(message);
            if (i % 1000 == 0)
            {
               session.commit();
            }
         }

         session.commit();
View Full Code Here

            {
               session.commit();
            }
         }

         session.commit();

         session.start();

         for (int nqueue = 0; nqueue < NQUEUES; nqueue++)
         {
View Full Code Here

            assertNull(consumer.receiveImmediate());

            consumer.close();

            session.commit();
         }

         PagingStore store = server.getPagingManager().getPageStore(ADDRESS);
         store.getCursorProvier().cleanup();
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.