Package javax.jms

Examples of javax.jms.Session.rollback()


               assertNotNull(tm);

               assertEquals("Message:" + j, tm.getText());
            }

            sess2.rollback();
         }
        
         //At this point all the messages have been delivered exactly MAX_DELIVERIES times - this is ok
         //they haven't exceeded max delivery attempts so shouldn't be in the DLQ - let's check
        
View Full Code Here


               assertNotNull(tm);

               assertEquals("Message:" + j, tm.getText());
            }

            sess2.rollback();
         }
        
         //At this point all the messages have been delivered exactly MAX_DELIVERIES times - this is ok
         //they haven't exceeded max delivery attempts so shouldn't be in the DLQ - let's check
        
View Full Code Here

         }

         // failover complete
         assertEquals(0, getServerId(conn));

         session.rollback();

         TextMessage m = (TextMessage)cons.receive(2000);
         assertNotNull(m);
         assertEquals("clik-persistent", m.getText());
View Full Code Here

                  int rbIdx = rand.nextInt(4);
                  //%25 change of rollback
                  if ( rbIdx == 1 )
                  {
                     //roll back
                     session.rollback();
                  }
                  else
                  {
                     synchronized(rcvBuffer1)
                     {
View Full Code Here

         if (HornetQRASession.trace)
         {
            HornetQRASession.log.trace("Rollback session " + this);
         }

         session.rollback();
      }
      finally
      {
         unlock();
      }
View Full Code Here

         }

         // failover complete
         assertEquals(0, getServerId(conn));

         session.rollback();

         TextMessage m = (TextMessage)cons.receive(2000);
         assertNotNull(m);
         assertEquals("clik-persistent", m.getText());
View Full Code Here

        Message msg = consumer.receive(1000);
        assertNotNull(msg);
        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());

        // Rollback.. should cause redelivery.
        session.rollback();

        // Attempt to Consume the message...
        msg = consumer.receive(2000);
        assertNotNull(msg);
        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
View Full Code Here

        Message msg = consumer.receive(1000);
        assertNotNull(msg);
        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());

        // Rollback.. should cause redelivery.
        session.rollback();

        // Attempt to Consume the message...
        msg = consumer.receive(2000);
        assertNotNull(msg);
        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
View Full Code Here

        Message msg = consumer.receive(1000);
        assertNotNull(msg);
        assertFalse("Message should not be redelivered.", msg.getJMSRedelivered());

        // Rollback.. should cause redelivery.
        session.rollback();

        // Attempt to Consume the message...
        msg = consumer.receive(2000);
        assertNotNull(msg);
        assertTrue("Message should be redelivered.", msg.getJMSRedelivered());
View Full Code Here

            Connection conn = getConnection("test", "client", "guest");
            Session sess = conn.createSession(true, Session.SESSION_TRANSACTED);
            conn.start();

            //Do something to show connection is active.
            sess.rollback();

            conn.close();
        }
        catch (Exception e)
        {
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.