Package javax.jms

Examples of javax.jms.Session.commit()


               }
            }

            messagesRead += (messageCount - lastCount);

            session.commit();
            consumer.close();
            session.close();
         }
         catch (Exception e)
         {
View Full Code Here


                  {
                     log.debug("commit");
                     messagesProduced += (messageCount - lastMessage);
                     lastMessage = messageCount;
                    
                     sess.commit();
                  }
                  else
                  {
                     log.debug("rollback");
                     lastMessage = messageCount;
View Full Code Here

                  messageCount ++;

               }

               messagesProduced += ((messageCount) - lastMessage);
               sess.commit();
               sess.close();

               if (messageCount % 50 == 0)
               {
                  log.info("Producer " + index + " sent " + messageCount + " messages");
View Full Code Here

        
         for (int i = 0; i < 100; i++)
         {
            assertEquals(1, rm.size());
           
            session.commit();
           
            assertEquals(1, rm.size());
         }                 
        
         assertEquals(1, rm.size());
View Full Code Here

        
         for (int i = 0; i < 100; i++)
         {
            assertEquals(1, rm.size());
           
            session.commit();
           
            assertEquals(1, rm.size());
         }                 
        
         assertEquals(1, rm.size());
View Full Code Here

         mRec1 = (TextMessage)consumer1.receive(2000);
         assertEquals("igloo", mRec1.getText());
         assertTrue(mRec1.getJMSRedelivered());
                          
         sess1.commit();
      }
      finally
      {     
         if (conn != null)
         {
View Full Code Here

  
        
         Message mSent = sess.createTextMessage("igloo");
         producer.send(mSent);
        
         sess.commit();
        
         TextMessage mRec = (TextMessage)consumer.receive(2000);

         assertEquals("igloo", mRec.getText());
         assertFalse(mRec.getJMSRedelivered());
View Full Code Here

         assertNotNull(mRec);
         assertEquals("igloo", mRec.getText());
         assertTrue(mRec.getJMSRedelivered());
        
         sess.commit();
      }
      finally
      {     
         if (conn != null)
         {
View Full Code Here

  
        
         TextMessage mSent = sess.createTextMessage("igloo");
         producer.send(mSent);
        
         sess.commit();
        
         TextMessage mRec = (TextMessage)consumer.receive(2000);
         assertEquals("igloo", mRec.getText());
        
         sess.commit();
View Full Code Here

         sess.commit();
        
         TextMessage mRec = (TextMessage)consumer.receive(2000);
         assertEquals("igloo", mRec.getText());
        
         sess.commit();
        
         mSent.setText("rollback");
         producer.send(mSent);
        
         sess.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.