Package org.jboss.test.messaging.core

Examples of org.jboss.test.messaging.core.SimpleCondition


     {  
       office1 = createClusteredPostOffice(1);

       Queue queue1 =  new MessagingQueue(1, "queue1", channelIDManager.getID(), ms, pm, true, -1, null, true);
       queue1.activate();
       boolean added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queue1, false), false);
       assertTrue(added);
      
       Queue queue2 =  new MessagingQueue(1, "queue2", channelIDManager.getID(), ms, pm, true, -1, null, true);
       queue2.activate();
       added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queue2, false), false);
       assertTrue(added);
      
       Queue queue3 =  new MessagingQueue(1, "queue3", channelIDManager.getID(), ms, pm, true, -1, null, true);
       queue3.activate();
       added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queue3, false), false);
       assertTrue(added);
      
       Queue queue4 =  new MessagingQueue(1, "queue4", channelIDManager.getID(), ms, pm, true, -1, null, true);
       queue4.activate();
       added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queue4, false), false);
       assertTrue(added);

       SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
       queue1.getLocalDistributor().add(receiver1);

       SimpleReceiver receiver2 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
       queue2.getLocalDistributor().add(receiver2);

       SimpleReceiver receiver3 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);
       queue3.getLocalDistributor().add(receiver3);
      
       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);     
       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


         office2 = createClusteredPostOffice(2);
        
         Queue queue1 = new MessagingQueue(1, "queue1", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue1.activate();
        
         Condition condition1 = new SimpleCondition("queue1");
        
         boolean added = office1.addBinding(new Binding(condition1, queue1, false), false);
         assertTrue(added);

         Queue queue2 = new MessagingQueue(2, "queue1", channelIDManager.getID(), ms, pm, false, -1, null, true);
View Full Code Here

        
         //condition1

         queues[0] = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[0].activate();
         boolean added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queues[0], false), false);
         assertTrue(added);
        
         queues[1] = new MessagingQueue(1, "sub2", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[1].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queues[1], false), false);
         assertTrue(added);
        
         queues[2] = new MessagingQueue(2, "sub3", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[2].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition1"), queues[2], false), false);
         assertTrue(added);
        
         queues[3] = new MessagingQueue(2, "sub4", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[3].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition1"), queues[3], false), false);
         assertTrue(added);
        
         queues[4] = new MessagingQueue(2, "sub5", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[4].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition1"), queues[4], false), false);
         assertTrue(added);
        
         queues[5] = new MessagingQueue(1, "sub6", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[5].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queues[5], false), false);
         assertTrue(added);
        
         queues[6] = new MessagingQueue(1, "sub7", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[6].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queues[6], false), false);
         assertTrue(added);
        
         queues[7] = new MessagingQueue(1, "sub8", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[7].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition1"), queues[7], false), false);
         assertTrue(added);
        
         //condition2
        
         queues[8] = new MessagingQueue(1, "sub9", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[8].activate();
         added= office1.addBinding(new Binding(new SimpleCondition("condition2"), queues[8], false), false);
         assertTrue(added);
        
         queues[9] = new MessagingQueue(1, "sub10", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[9].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition2"), queues[9], false), false);
         assertTrue(added);
        
         queues[10] = new MessagingQueue(2, "sub11", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[10].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition2"), queues[10], false), false);
         assertTrue(added);
        
         queues[11] = new MessagingQueue(2, "sub12", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[11].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition2"), queues[11], false), false);
         assertTrue(added);
        
         queues[12] = new MessagingQueue(2, "sub13", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[12].activate();
         added = office2.addBinding(new Binding(new SimpleCondition("condition2"), queues[12], false), false);
         assertTrue(added);
        
         queues[13] = new MessagingQueue(1, "sub14", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queues[13].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition2"), queues[13], false), false);
         assertTrue(added);
        
         queues[14] = new MessagingQueue(1, "sub15", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[14].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition2"), queues[14], false), false);
         assertTrue(added);
        
         queues[15] = new MessagingQueue(1, "sub16", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queues[15].activate();
         added = office1.addBinding(new Binding(new SimpleCondition("condition2"), queues[15], false), false);
         assertTrue(added);

         SimpleReceiver[] receivers = new SimpleReceiver[16];
        
         for (int i = 0; i < 16; i++)
         {
            receivers[i] = new SimpleReceiver("blah" + i, SimpleReceiver.ACCEPTING);
            queues[i].getLocalDistributor().add(receivers[i]);
         }
        
         //First for topic 1
        
         Message msg1 = CoreMessageFactory.createCoreMessage(1, persistent, null);;     
         MessageReference ref1 = ms.reference(msg1);
        
         Message msg2 = CoreMessageFactory.createCoreMessage(2, persistent, null);;     
         MessageReference ref2 = ms.reference(msg2);
        
         Transaction tx = tr.createTransaction();

         RouteResult routed = office1.route(ref1, new SimpleCondition("condition1"), tx);        
         assertTrue(routed.getResult());
         routed = office1.route(ref2, new SimpleCondition("condition1"), tx);        
         assertTrue(routed.getResult());
        
         for (int i = 0; i < 16; i++)
         {
           log.info("i is " + i);
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
            msgs = queues[i].browse(null);
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
         }
        
         log.info("committing");
         tx.commit();
         log.info("committed");
        
         //Messages are sent asych so may take some finite time to arrive
         Thread.sleep(3000);
        
         for (int i = 0; i < 16; i++)
         {
           if (i >= 8 || (queues[i].getNodeID() == 2 && queues[i].isRecoverable()))
           {    
             //Shouldn't get message
             List msgs = receivers[i].getMessages();
             assertNotNull(msgs);
             assertTrue(msgs.isEmpty());
             msgs = queues[i].browse(null);
             assertNotNull(msgs);
             assertTrue(msgs.isEmpty());
           }
           else
           {
             //Should get message
             log.info("is is " + i);
             log.info("trying with receiver " + receivers[i]);
             List msgs = receivers[i].getMessages();
             assertNotNull(msgs);
             assertEquals(2, msgs.size());
             Message msgRec1 = (Message)msgs.get(0);
             assertEquals(msg1.getMessageID(), msgRec1.getMessageID());
             Message msgRec2 = (Message)msgs.get(1);
             assertEquals(msg2.getMessageID(), msgRec2.getMessageID());           
             receivers[i].acknowledge(msgRec1, null);
             receivers[i].acknowledge(msgRec2, null);
             msgs = queues[i].browse(null);
             assertNotNull(msgs);           
             assertTrue(msgs.isEmpty());                       
             receivers[i].clear();
           }
         }
        
         msg1 = CoreMessageFactory.createCoreMessage(1, persistent, null);;     
         ref1 = ms.reference(msg1);
        
         msg2 = CoreMessageFactory.createCoreMessage(2, persistent, null);;     
         ref2 = ms.reference(msg2);
        
         tx = tr.createTransaction();

         routed = office1.route(ref1, new SimpleCondition("condition1"), tx);        
         assertTrue(routed.getResult());
         routed = office1.route(ref2, new SimpleCondition("condition1"), tx);        
         assertTrue(routed.getResult());
        
         //Messages are sent asych so may take some finite time to arrive
         Thread.sleep(3000);        
        
         for (int i = 0; i < 16; i++)
         {
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
            msgs = queues[i].browse(null);
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
         }
        
         tx.rollback();
        
         for (int i = 0; i < 16; i++)
         {
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
            msgs = queues[i].browse(null);
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
         }
        
        
         // Now for topic 2
        
         msg1 = CoreMessageFactory.createCoreMessage(1, persistent, null);   
         ref1 = ms.reference(msg1);
        
         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++)
         {
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
            msgs = queues[i].browse(null);
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
         }
        
         tx.commit();
        
         //Messages are sent asych so may take some finite time to arrive
         Thread.sleep(3000);
        
         for (int i = 8; i < 16; i++)
         {
           if (i < 8 || (queues[i].getNodeID() == 1 && queues[i].isRecoverable()))
          {    
             //  Shouldn't get message
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
            msgs = queues[i].browse(null);
            assertNotNull(msgs);
            assertTrue(msgs.isEmpty());
          }
          else
          {
            // Should get message
            log.info("is is " + i);
            log.info("trying with receiver " + receivers[i]);
            List msgs = receivers[i].getMessages();
            assertNotNull(msgs);
            assertEquals(2, msgs.size());
            Message msgRec1 = (Message)msgs.get(0);
            assertEquals(msg1.getMessageID(), msgRec1.getMessageID());
            Message msgRec2 = (Message)msgs.get(1);
            assertEquals(msg2.getMessageID(), msgRec2.getMessageID());           
            receivers[i].acknowledge(msgRec1, null);
            receivers[i].acknowledge(msgRec2, null);
            msgs = queues[i].browse(null);
            assertNotNull(msgs);           
            assertTrue(msgs.isEmpty());                       
            receivers[i].clear();
          }
         }
              
         msg1 = CoreMessageFactory.createCoreMessage(1, persistent, null);;     
         ref1 = ms.reference(msg1);
        
         msg2 = CoreMessageFactory.createCoreMessage(2, persistent, null);;     
         ref2 = ms.reference(msg2);
        
         tx = tr.createTransaction();

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

         // Add a couple of queues
        
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         boolean added = office1.addBinding(new Binding(condition1, queue1, false), false);
         assertTrue(added);
              
         Queue queue2 = new MessagingQueue(1, "sub2", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue2.activate();

         added = office1.addBinding(new Binding(condition1, queue2, false), false);
         assertTrue(added);
              
         // Start another office - make sure it picks up the bindings from the first node
        
         office2 = createClusteredPostOffice(2);
          
         // Should return all queues
         Collection queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue1));
         assertTrue(queues.contains(queue2));
               
        
         // Add another queue on node 2
        
         Queue queue3 = new MessagingQueue(2, "sub3", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue3.activate();

         added = office2.addBinding(new Binding(condition1, queue3, false), false);
         assertTrue(added);
 
         // Make sure both nodes pick it up
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue1));
         assertTrue(queues.contains(queue2));
         assertTrue(queues.contains(queue3));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue1));
         assertTrue(queues.contains(queue2));
         assertTrue(queues.contains(queue3));
       

         // Add another binding on node 2
        
         Queue queue4 = new MessagingQueue(2, "sub4", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue4.activate();

         added = office2.addBinding(new Binding(condition1, queue4, false), false);
         assertTrue(added);
        
         // Make sure both nodes pick it up
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(4, queues.size());
         assertTrue(queues.contains(queue1));
         assertTrue(queues.contains(queue2));
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(4, queues.size());
         assertTrue(queues.contains(queue1));
         assertTrue(queues.contains(queue2));
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
        
         // Unbind binding 1 and binding 2
         Binding removed = office1.removeBinding(queue1.getName(), false);
         assertNotNull(removed);
                 
         removed = office1.removeBinding(queue2.getName(), false);
         assertNotNull(removed);
        
         // Make sure bindings are not longer available on either node
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
        
        
         // Add a third office
                 
         office3 = createClusteredPostOffice(3);
        
         // Maks sure it picks up the bindings
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
        
         // Add another binding on node 3
                 
         Queue queue5 = new MessagingQueue(3, "sub5", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue5.activate();
        
         added = office3.addBinding(new Binding(condition1, queue5, false), false);
         assertTrue(added);
        
         // Make sure all nodes pick it up
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
        
         // Add a durable and a non durable binding on node 1
        
         Queue queue6 = new MessagingQueue(1, "sub6", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue6.activate();
        
         added = office1.addBinding(new Binding(condition1, queue6, false), false);
         assertTrue(added);
        
         Queue queue7 = new MessagingQueue(1, "sub7", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue7.activate();
        
         added = office1.addBinding(new Binding(condition1, queue7, false), false);
         assertTrue(added);
        
        
         // Make sure all nodes pick them up
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(5, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));
         assertTrue(queues.contains(queue7));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(5, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));
         assertTrue(queues.contains(queue7));
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(5, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));
         assertTrue(queues.contains(queue7));
              
         // Stop office 1
         office1.stop();
 
         // Need to sleep since it may take some time for the view changed request to reach the
         // members which causes the bindings to be removed.
        
         Thread.sleep(3000);
        
         // All it's bindings should be removed from the other nodes, including durable
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(3, queues.size());
         assertTrue(queues.contains(queue3));
         assertTrue(queues.contains(queue4));
         assertTrue(queues.contains(queue5));
        
         // Stop office 2
         office2.stop();
        
         Thread.sleep(3000);
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(1, queues.size());
         assertTrue(queues.contains(queue5));
        
         // Restart office 1 and office 2
         office1.start();
        
         office2.start();
                 
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(2, queues.size());
         assertTrue(queues.contains(queue5));
         assertTrue(queues.contains(queue6));

         // Stop all offices
        
         office1.stop();
         office2.stop();
         office3.stop();
        
         // Start them all
         office1.start();
         office2.start();
         office3.start();
        
         // Only the durable queue should survive
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(1, queues.size());
         assertTrue(queues.contains(queue6));
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(1, queues.size());
         assertTrue(queues.contains(queue6));
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertEquals(1, queues.size());
         assertTrue(queues.contains(queue6));      
        
         //Unbind it
        
         log.info("Removing queue6 binding");
         removed = office1.removeBinding(queue6.getName(), false);
         assertNotNull(removed);        
        
         queues = office1.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertTrue(queues.isEmpty());
        
         queues = office2.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertTrue(queues.isEmpty());
        
         queues = office3.getQueuesForCondition(condition1, false);
         assertNotNull(queues);
         assertTrue(queues.isEmpty());    
        
        
         //Bind another few more clustered
                          
         Queue queue8 = new MessagingQueue(1, "sub8", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue8.activate();
        
         Queue queue9 = new MessagingQueue(2, "sub9", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue9.activate();
        
         Queue queue10 = new MessagingQueue(2, "sub10", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue10.activate();
        
         //Bind on different conditions
        
         added = office1.addBinding(new Binding(condition1, queue8, false), false);
         assertTrue(added);
        
         added = office2.addBinding(new Binding(condition1, queue9, false), false);
         assertTrue(added);
        
         Condition condition2 = new SimpleCondition("condition2");
        
         added = office2.addBinding(new Binding(condition2, queue10, false), false);
         assertTrue(added);
        
         queues = office1.getQueuesForCondition(condition1, false);
View Full Code Here

                            
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

                          
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

                             
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

                          
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

                                  
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, true, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

                          
         //Durable
         Queue queue1 = new MessagingQueue(1, "sub1", channelIDManager.getID(), ms, pm, false, -1, null, true);
         queue1.activate();

         Condition condition1 = new SimpleCondition("condition1");
        
         //Add all binding
         boolean added = office1.addBinding(new Binding(condition1, queue1, true), true);
         assertTrue(added);
        
View Full Code Here

TOP

Related Classes of org.jboss.test.messaging.core.SimpleCondition

Copyright © 2018 www.massapicom. 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.