Examples of acknowledge()


Examples of javax.jms.Message.acknowledge()

            // TODO: assert error code and/or expected exception type
        }

        // tests whether receiving and acknowledgment is working on a clean session
        lastMessage = consumeMessages();
        lastMessage.acknowledge();
    }

    /**
     * Tests that call to {@link Message#acknowledge()} after failover throws an exception in asynchronous consumer
     * and we can consume messages after acknowledge.
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        assertFailoverException();


        try
        {
            currentMessage.acknowledge();
            fail("JMSException should be thrown!");
        }
        catch (JMSException e)
        {
            // TODO: assert error code and/or expected exception type
View Full Code Here

Examples of javax.jms.Message.acknowledge()

            assertReceivedMessage(message, TEST_MESSAGE_FORMAT, counter++);
            currentMessage = message;
        }

        // acknowledge again. It should be successful
        currentMessage.acknowledge();
    }

    /**
     * Test whether {@link Session#recover()} works as expected after failover
     * in AA mode.
View Full Code Here

Examples of javax.jms.ObjectMessage.acknowledge()

        mesg.setIntProperty
            (MessageType.JMQ_MESSAGE_TYPE, MessageType.GET_DESTINATIONS);
        sender.send(mesg);

        mesg = (ObjectMessage)receiver.receive(timeout);
        mesg.acknowledge();
        checkReplyTypeStatus(mesg, MessageType.GET_DESTINATIONS_REPLY,
            "GET_DESTINATIONS_REPLY");

  Object obj;
        if ((obj = mesg.getObject()) != null) {
View Full Code Here

Examples of javax.jms.StreamMessage.acknowledge()

            String value = sm.readString();
           
            assertEquals("stream-message", value);
         }
        
         sm.acknowledge();
        
         checkEmpty(queue1);
  
         conn.close();
      }
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

       TextMessage m =  (TextMessage)queueConsumer.receive(1500);
       assertEquals(m.getText(), "One");

       queueConsumer.close();

       m.acknowledge();

       try
       {
          queueConsumer.receive(2000);
          fail("should throw exception");
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

         
          assertEquals(tm3.getText(), r3.getText());

          r1.acknowledge();
          r2.acknowledge();
          r3.acknowledge();
       }
       finally
       {
          if (conn != null)
          {
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

                  sess.commit();
               }
               else
               {
                  log.trace("Acknowledging session");
                  tm.acknowledge();
               }
               latch.release();
            }
            count++;
         }
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

  
         assertNotNull(tm3);
  
         assertEquals("Your mum", tm3.getText());
  
         tm3.acknowledge();
      }
      finally
      {

         if (conn != null)
View Full Code Here

Examples of javax.jms.TextMessage.acknowledge()

      assertNotNull(tm3);

      assertEquals("Your mum", tm3.getText());

      tm3.acknowledge();

      conn.close();

   }
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.