Package javax.jms

Examples of javax.jms.TextMessage.acknowledge()


     
      assertEquals(((MessageProxy)m).getMessage().getMessageID(), ref.getMessage().getMessageID());
     
      ref.releaseMemoryReference();
         
      m2.acknowledge();
     
      ref = store.reference(((MessageProxy)m2).getMessage().getMessageID());
     
      assertNull(ref);
     
View Full Code Here


     
      assertEquals(((MessageProxy)m).getMessage().getMessageID(), ref.getMessage().getMessageID());
     
      ref.releaseMemoryReference();
     
      m2.acknowledge();
     
      ref = store.reference(((MessageProxy)m2).getMessage().getMessageID());
     
      assertNull(ref);
     
View Full Code Here

      TextMessage m6 = (TextMessage)cons.receive();
     
      assertNotNull(m6);
      assertEquals(m1.getText(), m6.getText());
     
      m6.acknowledge();
     
      MessageReference ref = store.reference(((MessageProxy)m2).getMessage().getMessageID());
     
      assertNull(ref);
     
View Full Code Here

    if (testConverter) {
      mockMessage.getText();
      messageControl.setReturnValue("Hello World!");
    }
    if (!useTransactedSession() && clientAcknowledge) {
      mockMessage.acknowledge();
      messageControl.setVoidCallable(1);
    }

    sessionControl.replay();
    connectionControl.replay();
View Full Code Here

    if (testConverter) {
      mockMessage.getText();
      messageControl.setReturnValue("Hello World!");
    }
    if (!useTransactedSession() && clientAcknowledge) {
      mockMessage.acknowledge();
      messageControl.setVoidCallable(1);
    }

    if (pubSub) {
      topicSessionControl.replay();
View Full Code Here

                    if (counter.get() == 2) {
                        sendDone.await();
                        connection.close();
                        got2Done.countDown();
                    }
                    tm.acknowledge();
                } catch (Throwable e) {
                    e.printStackTrace();
                }
            }
        });
View Full Code Here

        con2.close();

        _logger.info("Starting connection");
        con.start();
        TextMessage tm = (TextMessage) consumer.receive();
        tm.acknowledge();
        _logger.info("Received and acknowledged first message");
        consumer.receive();
        consumer.receive();
        consumer.receive();
        _logger.info("Received all four messages. Calling recover with three outstanding messages");
View Full Code Here

        tm = (TextMessage) consumer.receive(3000);
        assertEquals("msg4", tm.getText());

        _logger.info("Received redelivery of three messages. Acknowledging last message");
        tm.acknowledge();

        _logger.info("Calling acknowledge with no outstanding messages");
        // all acked so no messages to be delivered
        consumerSession.recover();
View Full Code Here

        _logger.info("Starting connection");
        con.start();
        TextMessage tm = (TextMessage) consumer.receive();
        consumer.receive();
        tm.acknowledge();
        _logger.info("Received 2 messages, acknowledge() first message, should acknowledge both");

        consumer.receive();
        consumer.receive();
        _logger.info("Received all four messages. Calling recover with two outstanding messages");
View Full Code Here

        TextMessage tm2 = (TextMessage) consumer2.receive();
        assertNotNull(tm2);
        assertEquals("msg2", tm2.getText());

        tm2.acknowledge();

        consumerSession.recover();

        TextMessage tm1 = (TextMessage) consumer.receive(2000);
        assertNotNull(tm1);
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.