public void testReceivedRollbackQueue() throws Exception
{
Connection conn = cf.createConnection();
Session sess = conn.createSession(true, Session.SESSION_TRANSACTED);
MessageProducer producer = sess.createProducer(queue);
MessageConsumer consumer = sess.createConsumer(queue);
conn.start();
TextMessage mSent = sess.createTextMessage("igloo");
producer.send(mSent);
log.trace("sent1");
sess.commit();
TextMessage mRec = (TextMessage)consumer.receive();
log.trace("Got 1");
assertNotNull(mRec);
assertEquals("igloo", mRec.getText());
sess.commit();
mSent.setText("rollback");
producer.send(mSent);
sess.commit();
log.trace("Receiving 2");
mRec = (TextMessage)consumer.receive();