Package org.jboss.jms.client

Examples of org.jboss.jms.client.JBossSession.commit()


    */
   public void testEmptyCommit() throws Exception
   {
      Connection conn = cf.createConnection();
      JBossSession session = (JBossSession)conn.createSession(true, Session.SESSION_TRANSACTED);
      session.commit();
      conn.close();
   }

   /**
    * This test was created as per http://jira.jboss.org/jira/browse/JBMESSAGING-696.
View Full Code Here


      MessageProducer producer = session.createProducer(destination);
      log.info(">>creating Message");
      Message message = session.createTextMessage("Hello Before");
      log.info(">>sending Message");
      producer.send(message);
      session.commit();

      receiveMessage("consumerHA", consumerHA, true, false);

      session.commit();
      //if (true) return;
View Full Code Here

      producer.send(message);
      session.commit();

      receiveMessage("consumerHA", consumerHA, true, false);

      session.commit();
      //if (true) return;

      Object txID = sessionState.getCurrentTxId();

      producer.send(session.createTextMessage("Hello again before failover"));
View Full Code Here

      assertEquals(txID, sessionState.getCurrentTxId());
      System.out.println("TransactionID on client = " + txID);
      log.info(">>Final commit");

      session.commit();

      log.info("Calling alternate receiver");
      receiveMessage("consumerHA", consumerHA, true, false);
      receiveMessage("consumerHA", consumerHA, true, false);
      receiveMessage("consumerHA", consumerHA, true, true);
View Full Code Here

      log.info("Calling alternate receiver");
      receiveMessage("consumerHA", consumerHA, true, false);
      receiveMessage("consumerHA", consumerHA, true, false);
      receiveMessage("consumerHA", consumerHA, true, true);

      session.commit();
      conn1.close();
      conn2.close();
   }

  
View Full Code Here

    */
   public void testEmptyCommit() throws Exception
   {
      Connection conn = cf.createConnection();
      JBossSession session = (JBossSession)conn.createSession(true, Session.SESSION_TRANSACTED);
      session.commit();
      conn.close();
   }

   /**
    * This test was created as per http://jira.jboss.org/jira/browse/JBMESSAGING-696.
View Full Code Here

         MessageConsumer consumerHA = session.createDurableSubscriber((Topic) destination, "T1");

         MessageProducer producer = session.createProducer(destination);
         Message message = session.createTextMessage("Hello Before");
         producer.send(message);
         session.commit();

         receiveMessage("consumerHA", consumerHA, true, false);

         session.commit();
         //if (true) return;
View Full Code Here

         producer.send(message);
         session.commit();

         receiveMessage("consumerHA", consumerHA, true, false);

         session.commit();
         //if (true) return;

         Object txID = sessionState.getCurrentTxId();

         producer.send(session.createTextMessage("Hello again before failover"));
View Full Code Here

         message = session.createTextMessage("Hello After");
         producer.send(message);

         assertEquals(txID, sessionState.getCurrentTxId());
         session.commit();

         receiveMessage("consumerHA", consumerHA, true, false);
         receiveMessage("consumerHA", consumerHA, true, false);
         receiveMessage("consumerHA", consumerHA, true, true);
View Full Code Here

         receiveMessage("consumerHA", consumerHA, true, false);
         receiveMessage("consumerHA", consumerHA, true, false);
         receiveMessage("consumerHA", consumerHA, true, true);

         session.commit();

         consumerHA.close();
         session.unsubscribe("T1");
      }
      finally
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.