Package javax.jms

Examples of javax.jms.Session.commit()


            producer0.send(session0.createTextMessage("message " + i));

            log.info("Sent message: message " + i);
         }
        
         session0.commit();
        
         conn0.close();
         conn0 = null;
        
         conn1.close();
View Full Code Here


            producer0.send(session0.createTextMessage("message " + i));

            log.info("Sent message: message " + i);
         }

         session0.commit();


         //Send some more on node 1

         log.info("Sending some messages on node 1");
View Full Code Here

            producer1.send(session1.createTextMessage("message " + i));

            log.info("Sent message: message " + i);
         }

         session1.commit();

         MessageConsumer cons0 = null;

         if (fillConsumer)
         {
View Full Code Here

         assertEquals(evenevenevennewerFailoverNodeId, getServerId(conn1));

         // Now ack
         if (transactional)
         {
            sess1.commit();
         } else
         {
            tm.acknowledge();
         }
View Full Code Here

         assertNull(ids);

         // Now ack
         if (transactional)
         {
            sess3.commit();
         } else
         {
            tm.acknowledge();
         }
View Full Code Here

         assertNull(ids);

         // Now ack
         if (transactional)
         {
            sess1.commit();
         } else
         {
            tm.acknowledge();
         }
View Full Code Here

         assertNull(ids);

         // Now ack
         if (transactional)
         {
            sess1.commit();
         } else
         {
            tm.acknowledge();
         }
View Full Code Here

            TextMessage tm = sess.createTextMessage("message:" + i);

            prod.send(tm);
         }

         sess.commit();

         conn.start();

         //Now consume half of the messages but don't commit them these will end up in
         //client side resource manager
View Full Code Here

            assertEquals("message:" + i, tm.getText());
         }

         //Now should be able to commit them

         sess.commit();

         //Now check there are no more messages there
         sess.close();

         checkEmpty(queue[1], finalServerID);
View Full Code Here

         prod.setDeliveryMode(DeliveryMode.PERSISTENT);
         prod.send(session.createTextMessage("clik-persistent"));
         prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
         prod.send(session.createTextMessage("clak-non-persistent"));

         session.commit();

         // close the producer

         prod.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.