Package javax.jms

Examples of javax.jms.TextMessage.acknowledge()


          assertNotNull(tm1_1);
         
          msgIds.add(tm1_1.getText());
        }
       
        tm1_1.acknowledge();
       
        cons1_1.close();
    
        Session sess1_2 = conn1.createSession(false, Session.CLIENT_ACKNOWLEDGE);
       
View Full Code Here


          assertNotNull(tm1_2);
         
          msgIds.add(tm1_2.getText());
        }
       
        tm1_2.acknowledge();
       
        cons1_2.close();
       
       
        //Two on node 2
View Full Code Here

          assertNotNull(tm2_1);
         
          msgIds.add(tm2_1.getText());
        }
       
        tm2_1.acknowledge();
       
        cons2_1.close();
       
        Session sess2_2 = conn2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
       
View Full Code Here

          assertNotNull(tm2_2);
         
          msgIds.add(tm2_2.getText());
        }
       
        tm2_2.acknowledge();
       
        cons2_2.close();
       
        assertEquals(numMessages, msgIds.size());
       
View Full Code Here

            assertEquals("message:" + i, tm.getText());
         }

         //Now should be able to acknowledge them

         tm.acknowledge();

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

         checkEmpty(queue[finalServerID], finalServerID);
View Full Code Here

         for (int i = 0; i < 10; i++)
         {
            TextMessage rm = (TextMessage)consumer.receive(1000);
            assertNotNull(rm);
            assertEquals("Ordering" + i, rm.getText());
            rm.acknowledge();
         }

         assertNull(consumer.receive(1000));
      }
      finally
View Full Code Here

         int i = 0;
         for (; i < 100; ++i)
         {
            m = (TextMessage)consumer.receive();
            log.trace("Received message " + i);
            m.acknowledge();
            assertTrue(m.getText().equals("ordering" + i));
         }

         assertRemainingMessages(0);
View Full Code Here

            // first
            TextMessage rm1 = (TextMessage)cons.receive(1000);
            assertNotNull(rm1);
            assertEquals("Message:0", rm1.getText());
            rm1.acknowledge();

            // second
            TextMessage rm2 = (TextMessage)cons.receive(1000);
            assertNotNull(rm2);
            assertEquals("Message:1", rm2.getText());
View Full Code Here

            // second
            TextMessage rm2 = (TextMessage)cons.receive(1000);
            assertNotNull(rm2);
            assertEquals("Message:1", rm2.getText());
            rm2.acknowledge();

            // third, leaving a hole
            for (int i = 0; i < MAX_DELIVERIES; i++)
            {
               TextMessage rm3 = (TextMessage)cons.receive(1000);
View Full Code Here

            // fourth
            TextMessage rm4 = (TextMessage)cons.receive(1000);
            assertNotNull(rm4);
            assertEquals("Message:3", rm4.getText());
            rm4.acknowledge();

            // fifth, leaving another hole
            for (int i = 0; i < MAX_DELIVERIES; i++)
            {
               TextMessage rm5 = (TextMessage)cons.receive(1000);
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.