7374757677787980818283
int i; for (i = 0; i < 10; i++) { msg.setText("Msg " + i); pub.send(msg); } session.commit(); System.out.println(i + " messages published."); cnx.close(); }
5657585960616263646566
for (int i = 1; i <= 100000; i++) { message.setText("Test number " + i); producer.send(message); if ((i % 100) == 0)session.commit(); if ((i % 1000) == 0) System.out.println(i + " messages sent"); } session.commit();
6061626364656667686970
if ((i % 100) == 0)session.commit(); if ((i % 1000) == 0) System.out.println(i + " messages sent"); } session.commit(); producer.close(); session.close(); cnx.close(); }
565758596061626364
msg.setText("Soap test " + i); producer.send(queue, msg); System.out.println("SOAP test " + i); } sess.commit(); cnx.close(); } }
5354555657585960616263
TextMessage msg = sess.createTextMessage(); msg.setBooleanProperty("showProperties", false); msg.setText("Queue : Test number #" + i); producer.send(msg); } sess.commit(); System.out.println("Messages sent."); cnx.close(); }
728729730731732733734735736737738
sess.commit(); mSent.setText("rollback"); producer.send(mSent); sess.commit(); log.trace("Receiving 2"); mRec = (TextMessage)consumer.receive(); log.trace("Received 2"); assertNotNull(mRec);
742743744745746747748749750751752
TextMessage mRec2 = (TextMessage)consumer.receive(); assertNotNull(mRec2); assertEquals("rollback", mRec2.getText()); sess.commit(); assertEquals(mRec.getText(), mRec2.getText()); conn.close(); }
866867868869870871872873874875876
Session producerSess = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE); boolean thrown = false; try { producerSess.commit(); } catch (javax.jms.IllegalStateException e) { thrown = true; }
10121013101410151016101710181019102010211022
log.trace("Received " + count + " messages"); assertEquals(NUM_MESSAGES, count); consumerSess.commit(); log.trace("Committed session"); conn.stop(); consumer.close();
208209210211212213214215216217218
if ( (commitCounter++) % 2 == 0) { messagesRead += (messageCount - lastCount); lastCount = messageCount; log.debug("commit"); session.commit(); } else { lastCount = messageCount; log.debug("rollback");