Package org.jboss.messaging.core.plugin.postoffice.cluster

Examples of org.jboss.messaging.core.plugin.postoffice.cluster.LocalClusteredQueue.deliver()


         // Pull from 1 to 2

         receiver2.setMaxRefs(1);

         log.trace("delivering");
         queue2.deliver();

         Thread.sleep(3000);

         assertTrue(office1.getHoldingTransactions().isEmpty());
         assertTrue(office2.getHoldingTransactions().isEmpty());
View Full Code Here


         //Force a failure before commit
         office2.setFail(true, false, false);

         log.trace("delivering");
         queue2.deliver();

         Thread.sleep(3000);

         assertEquals(1, office1.getHoldingTransactions().size());
         assertTrue(office2.getHoldingTransactions().isEmpty());
View Full Code Here

         //Force a failure after commit the ack to storage
         office2.setFail(false, true, false);

         log.trace("delivering");
         queue2.deliver();

         Thread.sleep(3000);

         assertEquals(1, office1.getHoldingTransactions().size());
         assertTrue(office2.getHoldingTransactions().isEmpty());
View Full Code Here

         receiver2.setMaxRefs(1);

         office2.setFail(false, false, true);

         log.trace("delivering");
         queue2.deliver();

         Thread.sleep(3000);

         //The delivery should be rolled back
View Full Code Here

         assertEquals(20, queue4.getDeliveringCount());
         acknowledgeAll(receiver4);
         receiver4.setMaxRefs(0);

         receiver5.setMaxRefs(25);
         queue5.deliver();
         readOK = receiver5.waitForHandleInvocations(25, 20000);
         assertTrue(readOK);
         Thread.sleep(1000);
         assertEquals(NUM_MESSAGES - 25, queue5.memoryRefCount());
         assertEquals(25, queue5.getDeliveringCount());
View Full Code Here

         log.trace("queue4, refs:" + queue4.memoryRefCount() + " dels:" + queue4.getDeliveringCount());
         log.trace("queue5, refs:" + queue5.memoryRefCount() + " dels:" + queue5.getDeliveringCount());

         // Consume the rest from queue 5
         receiver5.setMaxRefs(NUM_MESSAGES - 25);
         queue5.deliver();
         readOK = receiver5.waitForHandleInvocations(NUM_MESSAGES - 25, 20000);
         assertTrue(readOK);

         Thread.sleep(2000);
View Full Code Here

         // Now consume 5 more from queue5, they should come from queue1 which has the most messages

         log.trace("Consume 5 more from queue 5");

         receiver5.setMaxRefs(5);
         queue5.deliver();
         readOK = receiver5.waitForHandleInvocations(5, 20000);
         assertTrue(readOK);

         Thread.sleep(4000);
View Full Code Here

         assertTrue(office5.getHoldingTransactions().isEmpty());

         // Consume 1 more - should pull one from queue2

         receiver5.setMaxRefs(1);
         queue5.deliver();
         readOK = receiver5.waitForHandleInvocations(1, 20000);
         assertTrue(readOK);

         Thread.sleep(2000);
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.