QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
Queue queue = null;
QueueConnection connection = factory.createQueueConnection();
try
{
QueueSession s = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = s.createTemporaryQueue();
QueueConnection connection2 = factory.createQueueConnection();
try
{
connection2.createConnectionConsumer(queue, "", MockServerSessionPool.getServerSessionPool(), 1);