Package org.jboss.test.messaging.core

Examples of org.jboss.test.messaging.core.SimpleReceiver.acknowledge()


      for(Iterator i = r.getMessages().iterator(); i.hasNext();)
      {
         Message ackm = (Message)i.next();
         // non-transacted acknowledgment
         r.acknowledge(ackm, null);
      }

      assertTrue(queue.browse().isEmpty());

   }
View Full Code Here


      for(Iterator i = r.getMessages().iterator(); i.hasNext();)
      {
         Message ackm = (Message)i.next();
         // transacted acknowledgment
         r.acknowledge(ackm, tx);
      }

      assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount());

      tx.commit();
View Full Code Here

      for(Iterator i = r.getMessages().iterator(); i.hasNext();)
      {
         Message ackm = (Message)i.next();
         // transacted acknowledgment
         r.acknowledge(ackm, tx);
      }

      assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount());

      tx.rollback();
View Full Code Here

      // acknowledge non-transactionally
      for(Iterator i = r.getMessages().iterator(); i.hasNext();)
      {
         Message ackm = (Message)i.next();
         // non-transacted acknowledgment
         r.acknowledge(ackm, null);
      }

      assertTrue(queue.browse().isEmpty());
   }
View Full Code Here

      assertEquals(1, acknowledging.size());
      Message ackm = (Message)acknowledging.get(0);
      assertEquals(0, ackm.getMessageID());

      // non-transacted acknowledgment
      r.acknowledge(ackm, null);

      assertTrue(queue.browse().isEmpty());
   }

   /**
 
View Full Code Here

      queue.handle(observer, ref, null);

      Message ackm = (Message)r.getMessages().get(0);

      // acknowledge once
      r.acknowledge(ackm, null);

      assertTrue(queue.browse().isEmpty());

      // acknowledge twice
      try
View Full Code Here

      assertTrue(queue.browse().isEmpty());

      // acknowledge twice
      try
      {
         r.acknowledge(ackm, null);
      }
      catch(IllegalStateException e)
      {
         // OK
      }
View Full Code Here

      // Acknowledgment handling implemenation is NOT idempotent, the channel DOES NOT allow
      // extraneous duplicate acknowlegments, so we test for that.

      try
      {
         r.acknowledge(ackm, null);
      }
      catch(IllegalStateException e)
      {
         // OK
         log.trace(e);
View Full Code Here

      assertEquals(0, ackm.getMessageID());

      Transaction tx = tr.createTransaction();

      // transacted acknowledgment
      r.acknowledge(ackm, tx);

      deliveringCount = queue.getDeliveringCount();
      assertEquals(1, deliveringCount);

      tx.commit();
View Full Code Here

      assertEquals(0, ackm.getMessageID());

      Transaction tx = tr.createTransaction();

      // transacted acknowledgment
      r.acknowledge(ackm, tx);

      deliveringCount = queue.getDeliveringCount();
      assertEquals(1, deliveringCount);

      tx.rollback();
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.