Package javax.jms

Examples of javax.jms.TopicSession.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 */
            this.checkHeaders(msg1, t, start, type, false, msg.getJMSMessageID());
            /* Check, if the headers are set for msg2 */
            this.checkHeaders(msg2, t, start, type, false, msg.getJMSMessageID());
            /* Check, if the headers are set for msg3 */
 
View Full Code Here


                     publisher.publish(message, persistence, 4, 0);
                     //publisher.publish(topic, message, persistence, 4, 0);
                     //getLog().debug("  Sent #"+i);
                     if (transacted == TRANS_INDIVIDUAL)
                     {
                        session.commit();
                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
View Full Code Here

                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
                     session.commit();
                  }

                  long endTime = System.currentTimeMillis();
                  session.close();
View Full Code Here

            public void onMessage(Message message)
            {
               try
               {
        if( transacted == TRANS_INDIVIDUAL )
          session.commit();
                  i++;
               }
               catch (JMSException e)
               {
                  getLog().error("Unable to commit", e);
View Full Code Here

         listener.wait();
      }

      if (transacted == TRANS_TOTAL)
      {
         session.commit();
      }

      session.close();
      sendThread.join();
      long endTime = System.currentTimeMillis();
View Full Code Here

                     publisher.publish(message, persistence, 4, 0);
                     //publisher.publish(topic, message, persistence, 4, 0);
                     //getLog().debug("  Sent #"+i);
                     if (transacted == TRANS_INDIVIDUAL)
                     {
                        session.commit();
                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
View Full Code Here

                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
                     session.commit();
                  }

                  long endTime = System.currentTimeMillis();

                  session.close();
View Full Code Here

                  {
                     subscriber.receive();
                     //getLog().debug("  Received #"+i);
                     if (transacted == TRANS_INDIVIDUAL)
                     {
                        session.commit();
                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
View Full Code Here

                     }
                  }

                  if (transacted == TRANS_TOTAL)
                  {
                     session.commit();
                  }

                  long endTime = System.currentTimeMillis();

                  session.close();
View Full Code Here

            TopicSession pubSession = connection.createTopicSession(true, org.apache.qpid.jms.Session.SESSION_TRANSACTED);
            Topic topic = pubSession.createTopic(TOPIC_NAME);
            TopicPublisher publisher = pubSession.createPublisher(topic);
           
            BDBStoreUpgradeTestPreparer.publishMessages(pubSession, publisher, topic, DeliveryMode.PERSISTENT, 1*1024, 1, "false");
            pubSession.commit();
            assertEquals("DurableSubscription backing queue should still have 1 message on it",
                        new Integer(1), dursubQueue.getMessageCount());
           
            BDBStoreUpgradeTestPreparer.publishMessages(pubSession, publisher, topic, DeliveryMode.PERSISTENT, 1*1024, 1, "true");
            pubSession.commit();
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.