Package javax.jms

Examples of javax.jms.TextMessage.propertyExists()


         TextMessage tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(1, tm.getIntProperty("JMSXDeliveryCount"));

         s.recover();

         tm = (TextMessage)c.receive(1000);
View Full Code Here


         tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(2, tm.getIntProperty("JMSXDeliveryCount"));

         tm.acknowledge();

         conn.close();
View Full Code Here

            {
               tm = (TextMessage)cons.receive(3000);
               ProxyAssertSupport.assertNotNull(tm);
               ProxyAssertSupport.assertEquals("testing" + i, tm.getText());
               ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                             tm.propertyExists("JMSXDeliveryCount"));
               ProxyAssertSupport.assertEquals(j + 1, tm.getIntProperty("JMSXDeliveryCount"));
            }
            if (j != NUM_RECOVERIES - 1)
            {
               sess2.recover();
View Full Code Here

        }

        public void onMessage(Message message) {
            final TextMessage msg = (TextMessage) message;
            try {
                if (!msg.propertyExists(PRP_WORKER_ID)) {
                    for (int i = 0; i < WORKER_INTERNAL_ITERATIONS; i++) {
                        final TextMessage newMsg = session.createTextMessage(msg.getText());
                        newMsg.setStringProperty(PRP_WORKER_ID, name + "-" + i);
                        newMsg.setStringProperty(PRP_INITIAL_ID, msg.getStringProperty(PRP_INITIAL_ID));
                        producer.send(newMsg);
View Full Code Here

         TextMessage tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(1, tm.getIntProperty("JMSXDeliveryCount"));

         s.recover();

         tm = (TextMessage)c.receive(1000);
View Full Code Here

         tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(2, tm.getIntProperty("JMSXDeliveryCount"));

         tm.acknowledge();

         conn.close();
View Full Code Here

            {
               tm = (TextMessage)cons.receive(3000);
               ProxyAssertSupport.assertNotNull(tm);
               ProxyAssertSupport.assertEquals("testing" + i, tm.getText());
               ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                             tm.propertyExists("JMSXDeliveryCount"));
               ProxyAssertSupport.assertEquals(j + 1, tm.getIntProperty("JMSXDeliveryCount"));
            }
            if (j != NUM_RECOVERIES - 1)
            {
               sess2.recover();
View Full Code Here

         TextMessage tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(1, tm.getIntProperty("JMSXDeliveryCount"));

         s.recover();

         tm = (TextMessage)c.receive(1000);
View Full Code Here

         tm = (TextMessage)c.receive(1000);

         ProxyAssertSupport.assertEquals("xoxo", tm.getText());
         ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                       tm.propertyExists("JMSXDeliveryCount"));
         ProxyAssertSupport.assertEquals(2, tm.getIntProperty("JMSXDeliveryCount"));

         tm.acknowledge();

         conn.close();
View Full Code Here

            {
               tm = (TextMessage)cons.receive(3000);
               ProxyAssertSupport.assertNotNull(tm);
               ProxyAssertSupport.assertEquals("testing" + i, tm.getText());
               ProxyAssertSupport.assertTrue("JMSXDeliveryCount is supposed to exist as a property",
                                             tm.propertyExists("JMSXDeliveryCount"));
               ProxyAssertSupport.assertEquals(j + 1, tm.getIntProperty("JMSXDeliveryCount"));
            }
            if (j != NUM_RECOVERIES - 1)
            {
               sess2.recover();
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.