@@ -0,0 +1,1744 @@
+package org.apache.activemq.bugs;%0A%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport javax.jms.Connection;%0Aimport javax.jms.ConnectionFactory;%0Aimport javax.jms.Destination;%0Aimport javax.jms.MessageConsumer;%0Aimport javax.jms.MessageProducer;%0Aimport javax.jms.Session;%0Aimport javax.jms.TextMessage;%0A%0Aimport org.apache.activemq.ActiveMQConnectionFactory;%0Aimport org.apache.activemq.command.ActiveMQQueue;%0Aimport org.junit.Test;%0A%0Apublic class AMQ2383Test %7B%0A%0A    @Test%0A    public void activeMQTest() throws Exception %7B%0A        Destination dest = ActiveMQQueue.createDestination(%22testQueue%22, ActiveMQQueue.QUEUE_TYPE);%0A        ConnectionFactory factory = new ActiveMQConnectionFactory(%0A                %22vm://localhost?broker.useJmx=false&broker.persistent=false%22);%0A        Connection producerConnection = factory.createConnection();%0A        producerConnection.start();%0A        Connection consumerConnection = factory.createConnection();%0A        consumerConnection.start();%0A%0A        Session producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);%0A        MessageProducer producer = producerSession.createProducer(dest);%0A        TextMessage sentMsg = producerSession.createTextMessage(%22test...%22);%0A        producer.send(sentMsg);%0A        producerSession.close();%0A%0A        Session consumerSession = consumerConnection.createSession(true, Session.SESSION_TRANSACTED);%0A        MessageConsumer consumer = consumerSession.createConsumer(dest);%0A        TextMessage receivedMsg = (TextMessage)consumer.receive();%0A        consumerSession.rollback();%0A        consumerSession.close();%0A%0A        assertEquals(sentMsg, receivedMsg);%0A%0A        Thread.sleep(10000);%0A%0A        producerConnection.close();%0A        consumerConnection.close();%0A    %7D%0A%7D%0A

test case for: https://issues.apache.org/activemq/browse/AMQ-2383 - works on trunk