Package javax.jms

Examples of javax.jms.Session.rollback()


         Session session = getSession();
         if (info.isTransacted() == false)
            throw new IllegalStateException("Session is not transacted");
         if (trace)
            log.trace("Rollback session " + this);
         session.rollback();
      }
      finally
      {
         unlock();
      }
View Full Code Here


                    if(_sessionType == Session.SESSION_TRANSACTED)
                    {
                         if (_count%10 == 0)
                         {
                             LOGGER.debug("transacted session rollback");
                             session.rollback();
                         }
                         else
                         {
                             LOGGER.debug("transacted session commit");
                            session.commit();
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

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

            fail("Connection was created.");
        }
        catch (JMSException e)
        {
View Full Code Here

        subscriber.close();
        sess.unsubscribe("kipper");

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


    public void setUpClientDeleteQueueFailure() throws Exception
View Full Code Here

        try
        {
            sess.unsubscribe("kipper");

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

            fail("Exception was not thrown");
        }
        catch (JMSException e)
        {
View Full Code Here

        subscriber.close();
        sess.unsubscribe(topicName);

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

    public void setUpFirewallAllow() throws Exception
    {
View Full Code Here

 
        log.trace("Received " + count +  " messages");
 
        assertEquals(count, NUM_MESSAGES);
 
        consumerSess.rollback();
       
        assertRemainingMessages(NUM_MESSAGES);
 
        log.trace("Session rollback called");
 
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

         }

         // 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

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.