Package org.jboss.messaging.core.contract

Examples of org.jboss.messaging.core.contract.PostOffice.route()


        
         tx = tr.createTransaction();

         routed = office2.route(ref1, new SimpleCondition("condition2"), tx);        
         assertTrue(routed);
         routed = office2.route(ref2, new SimpleCondition("condition2"), tx);        
         assertTrue(routed);
                          
         for (int i = 0; i < 16; i++)
         {
            List msgs = receivers[i].getMessages();
View Full Code Here


       SimpleReceiver receiver4 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
       queue4.getLocalDistributor().add(receiver4);

       Message msg1 = CoreMessageFactory.createCoreMessage(1, true, null);     
       MessageReference ref1 = ms.reference(msg1)
       RouteResult routed = office1.route(ref1, new SimpleCondition("condition1"), null);  
       assertTrue(routed.getResult());

       Message msg2 = CoreMessageFactory.createCoreMessage(2, true, null);     
       MessageReference ref2 = ms.reference(msg2);        
       routed = office1.route(ref2, new SimpleCondition("condition1"), null);     
View Full Code Here

       RouteResult routed = office1.route(ref1, new SimpleCondition("condition1"), null);  
       assertTrue(routed.getResult());

       Message msg2 = CoreMessageFactory.createCoreMessage(2, true, null);     
       MessageReference ref2 = ms.reference(msg2);        
       routed = office1.route(ref2, new SimpleCondition("condition1"), null);     
       assertTrue(routed.getResult());

       Message msg3 = CoreMessageFactory.createCoreMessage(3, true, null);     
       MessageReference ref3 = ms.reference(msg3);        
       routed = office1.route(ref3, new SimpleCondition("condition1"), null);     
View Full Code Here

       routed = office1.route(ref2, new SimpleCondition("condition1"), null);     
       assertTrue(routed.getResult());

       Message msg3 = CoreMessageFactory.createCoreMessage(3, true, null);     
       MessageReference ref3 = ms.reference(msg3);        
       routed = office1.route(ref3, new SimpleCondition("condition1"), null);     
       assertTrue(routed.getResult());

       Thread.sleep(3000);
      
       List msgs = receiver1.getMessages();
View Full Code Here

         msg2 = CoreMessageFactory.createCoreMessage(2, persistent, null);    
         ref2 = ms.reference(msg2);
        
         tx = tr.createTransaction();

         routed = office2.route(ref1, new SimpleCondition("condition2"), tx);        
         assertTrue(routed.getResult());
         routed = office2.route(ref2, new SimpleCondition("condition2"), tx);        
         assertTrue(routed.getResult());
                          
         for (int i = 0; i < 16; i++)
View Full Code Here

        
         tx = tr.createTransaction();

         routed = office2.route(ref1, new SimpleCondition("condition2"), tx);        
         assertTrue(routed.getResult());
         routed = office2.route(ref2, new SimpleCondition("condition2"), tx);        
         assertTrue(routed.getResult());
                          
         for (int i = 0; i < 16; i++)
         {
            List msgs = receivers[i].getMessages();
View Full Code Here

       //Now route to condition2

       msg = CoreMessageFactory.createCoreMessage(2, persistentMessage, null);;     
       ref = ms.reference(msg);        

       routed = office2.route(ref, new SimpleCondition("condition2"), null);        
       assertTrue(routed);
       //Messages are sent asych so may take some finite time to arrive
       Thread.sleep(3000);

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

       //Now route to condition2

       msg = CoreMessageFactory.createCoreMessage(2, persistentMessage, null);;     
       ref = ms.reference(msg);        

       routed = office2.route(ref, new SimpleCondition("condition2"), null);        
       assertTrue(routed);
       //Messages are sent asych so may take some finite time to arrive
       Thread.sleep(3000);

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

       //  Route to myqueue1 from office 2     

       msg = CoreMessageFactory.createCoreMessage(2, persistentMessage, null);     
       ref = ms.reference(msg);        

       routed = office2.route(ref, new SimpleCondition("myqueue1"), null);        
       assertTrue(routed);

       //Messages are sent asych so may take some finite time to arrive
       Thread.sleep(3000);
View Full Code Here

       //Now route to condition2 from office 2

       msg = CoreMessageFactory.createCoreMessage(4, persistentMessage, null);;     
       ref = ms.reference(msg);        

       routed = office2.route(ref, new SimpleCondition("myqueue2"), null);        
       assertTrue(routed);
       //Messages are sent asych so may take some finite time to arrive
       Thread.sleep(3000);

       // Only queue3 should get the message
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.