Examples of acknowledge()


Examples of javax.jms.TextMessage.acknowledge()

               {
                  log.trace("Expected a but got " + tm.getText());
                  failed = true;
                  latch.release();
               }    
               tm.acknowledge();
               assertRemainingMessages(2);
               sess.recover();
            }
            if (count == 5)
            {
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

               {
                  log.trace("Expected c but got " + tm.getText());
                  failed = true;
                  latch.release();
               }
               tm.acknowledge();
               assertRemainingMessages(0);
               latch.release();
            }
              
         }
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

         log.info("here2");

         //Now should be able to acknowledge them

         tm.acknowledge();

         //Now check there are no more messages there
         sess.close();

         sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

      ObjectName on = new ObjectName("jboss.messaging.destination:service=Queue,name=JMSTestQueue");
      Integer mc = (Integer)ServerManagement.getAttribute(on, "MessageCount");

      assertEquals(1, mc.intValue());

      m.acknowledge();

      // make sure there's nothing in queue anymore
      mc = (Integer)ServerManagement.getAttribute(on, "MessageCount");

      assertEquals(0, mc.intValue());
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

         assertEquals(0, ((JBossConnection)conn).getServerID());

         // acknowledge the messages
         clik.acknowledge();
         clak.acknowledge();

         // make sure no messages are left in the queue
         Message m = cons.receive(1000);
         assertNull(m);
      }
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

         // failover complete
         assertEquals(0, getServerId(conn));

         // acknowledge the messages
         clik.acknowledge();
         clak.acknowledge();

         // make sure no messages are left in the queue
         checkEmpty(queue[1], 0);
      }
      finally
View Full Code Here

Examples of net.timewalker.ffmq3.common.session.AbstractSession.acknowledge()

       
        int acknowledgeMode = session.getAcknowledgeMode();
        if (acknowledgeMode != Session.CLIENT_ACKNOWLEDGE)
            return; // Ignore [JMS SPEC]
       
        session.acknowledge();      
    }

    /* (non-Javadoc)
     * @see javax.jms.Message#clearProperties()
     */
 
View Full Code Here

Examples of net.timewalker.ffmq3.local.session.LocalSession.acknowledge()

    }
   
    private AcknowledgeResponse processAcknowledge( AcknowledgeQuery query ) throws JMSException
    {
        LocalSession session = lookupSession(query);
        session.acknowledge(query.getDeliveredMessageIDs());
       
        return new AcknowledgeResponse();
    }
   
    private AbstractResponsePacket processAsyncAcknowledge( AsyncAcknowledgeQuery query ) throws JMSException
View Full Code Here

Examples of org.hornetq.api.core.Message.acknowledge()

         for (int j = 0; j < 1000; j++)
         {
            ClientMessage msg = cons.receive(2000);
            Assert.assertNotNull(msg);
            msg.acknowledge();
         }

         // I need to guarantee a roundtrip to the server, to make sure everything is persisted
         session.commit();
View Full Code Here

Examples of org.hornetq.api.core.client.ClientMessage.acknowledge()

      ClientConsumer consumer = session.createConsumer(queue);
      ClientMessage message = consumer.receive(500);
      Assert.assertNotNull(message);
      Assert.assertEquals(1, queueControl.getDeliveringCount());

      message.acknowledge();
      session.commit();
      Assert.assertEquals(0, queueControl.getDeliveringCount());

      consumer.close();
      session.deleteQueue(queue);
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.