Package javax.jms

Examples of javax.jms.QueueSession.commit()


            Assert.assertNull(msg);
            s_rec.commit();
            msg = qr_plain.receiveNoWait();
            Assert.assertNotNull(msg);
            Assert.assertEquals("myprop", "ccc", msg.getStringProperty("myprop"));
            s_rec.commit();
           
        } finally {
            try { s_rec.close()} catch(Exception ex) {}
            try { s_send.close(); } catch(Exception ex) {}
            try { qc.close();     } catch(Exception ex) {}
View Full Code Here


            /* Wait 3 seconds, give the provider a bit of time ... */
            Thread.sleep(3000);
            /* Receive the message */
            Message message = qr.receiveNoWait();
            /* Commit the session to clear the queue */
            s_rec.commit();
            //map message?
            Assert.assertTrue(message instanceof MapMessage);
            msg = (MapMessage)message;
            Assert.assertNotNull(msg.getObject("boolean"));
            Assert.assertNotNull(msg.getObject("byte"));
View Full Code Here

                     //sender.send(queue, message, persistence, 4, 0);
                     sender.send(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

                     sender.send( message, persistence, 4, 0);
                     //sender.send(queue, 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();
                  }

                  session.close();

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

                  {
                     receiver.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

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.