private Connection connection;
private Latch latch = new Latch();
public void testTransaction() throws Exception {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
factory.setUseEmbeddedBroker(true);
connection = factory.createConnection();
queue = new ActiveMQQueue(getClass().getName() + "." + getName());
producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
consumerSession = connection.createSession(true, 0);