548549550551552553554555556557558
producer0.send(session0.createTextMessage("message " + i)); log.info("Sent message: message " + i); } session0.commit(); conn0.close(); conn0 = null; conn1.close();
625626627628629630631632633634635
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");
643644645646647648649650651652653
producer1.send(session1.createTextMessage("message " + i)); log.info("Sent message: message " + i); } session1.commit(); MessageConsumer cons0 = null; if (fillConsumer) {
289290291292293294295296297298299
assertEquals(evenevenevennewerFailoverNodeId, getServerId(conn1)); // Now ack if (transactional) { sess1.commit(); } else { tm.acknowledge(); }
479480481482483484485486487488489
assertNull(ids); // Now ack if (transactional) { sess3.commit(); } else { tm.acknowledge(); }
658659660661662663664665666667668
assertNull(ids); // Now ack if (transactional) { sess1.commit(); } else { tm.acknowledge(); }
836837838839840841842843844845846
527528529530531532533534535536537
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
584585586587588589590591592593594
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);
10181019102010211022102310241025102610271028
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();