Package javax.jms

Examples of javax.jms.TopicSession.rollback()


         TextMessage m2 = (TextMessage)sub.receive(3000);
               
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
         sess.rollback();
        
         conn.close();
         conn = cf.createTopicConnection();
         conn.start();
        
View Full Code Here


        
         TextMessage m2 = (TextMessage)cons.receive(3000);
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
         sess.rollback();
        
         m2 = (TextMessage)cons.receive(3000);
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
View Full Code Here

        
         TextMessage m5 = (TextMessage)newcons.receive(3000);
         assertNotNull(m5);
         assertEquals("testing456", m5.getText());
        
         newsess.rollback();
        
         TextMessage m6 = (TextMessage)newcons.receive(3000);
         assertNotNull(m6);
         assertEquals("testing456", m6.getText());
        
View Full Code Here

      }
      getLog().debug("Got all messages");
      subscriber.setMessageListener(null);

      if (explicit)
         session.rollback();
      session.close();

      sendThread.join();
      topicConnection.stop();
      queueConnection.stop();
View Full Code Here

         getLog().debug("Got all messages");
         subscriber.setMessageListener(null);
         subscriber.close();

         if (explicit)
            session.rollback();
         session.close();

         sendThread.join();
         topicDurableConnection.stop();
         queueConnection.stop();
View Full Code Here

         TextMessage m2 = (TextMessage)sub.receive(3000);
               
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
         sess.rollback();
        
         conn.close();
        
         checkEmpty(topic1);
      }
View Full Code Here

        
         TextMessage m2 = (TextMessage)cons.receive(3000);
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
         sess.rollback();
        
         m2 = (TextMessage)cons.receive(3000);
         assertNotNull(m2);
         assertEquals("testing123", m2.getText());
        
View Full Code Here

        
         TextMessage m5 = (TextMessage)newcons.receive(3000);
         assertNotNull(m5);
         assertEquals("testing456", m5.getText());
        
         newsess.rollback();
        
         TextMessage m6 = (TextMessage)newcons.receive(3000);
         assertNotNull(m6);
         assertEquals("testing456", m6.getText());
        
View Full Code Here

            Assert.assertNotNull("subscriber 2 - message recieved", msg2);
            Assert.assertNotNull("subscriber 3 - message recieved", msg3);
            /* Commit the session 1 to clear the topic */
            s_rec1.commit();
            /* Rollback the session 2 */
            s_rec2.rollback();
            msg3 = ts3.receiveNoWait();
            Assert.assertNotNull("subscriber 3 - message redelivered after rollback", msg3);
            /* Commit the session 2 to clear the topic */
            s_rec2.commit();
            /* Check, if the headers are set for msg1 */
 
View Full Code Here

      }
      getLog().debug("Got all messages");
      subscriber.setMessageListener(null);

      if (explicit)
         session.rollback();
      session.close();

      sendThread.join();
      topicConnection.stop();
      queueConnection.stop();
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.