Glassfish - JMS Request/Response - message doesn't go on queue
===

I'm trying to implement a web service in Glassfish 3.1.2, using the included OpenMQ JMS queue, that implements a synchronous JMS Request-Response using Temporary queuing for the response. It sends a message that is picked up off the main queue by a remote client job (runs outside of container), and receives back a response on the temporary queue.

In a basic Java POC, this works. But once I put the server-side code into the container, it doesn't work. 

I turned off the job so that the messages would just go to the queue and not be picked up, and I follow the queue with QBrowser. 

If I simply send the message from the producer, **it gets onto the queue and could be read by the job.**

But once I add in the code to receive() the response, **the message is not readable on the queue.** QBrowser says that there is 1 message on the queue, but it is marked UnAck and the queue appears empty (e.g. message is not readable).

connectionFactory and requestQueue are injected as @Resource from glassfish. Main queue is defined in glassfish.

Web Service innards:

    connection = connectionFactory .createConnection();
    connection.start();

    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

    MessageProducer producer = session.createProducer(requestQueue);
    producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
    
    MyObject myObj=new MyObject();
    Message message=session.createObjectMessage(myObj);

    TemporaryQueue responseQueue = session.createTemporaryQueue();
    MessageConsumer consumer = session.createConsumer(responseQueue);

    message.setJMSReplyTo(responseQueue);

    producer.send(message);

    //if I comment out the next line, the message appears on the queue. If I leave it in, it will behave as described above.
    Message response=consumer.receive();


    
I've tried various approaches, including separate connections and sessions and asynchronous consumer, and attempted a Transacted session for the producer but only got stacktraces when trying to commit. 

What am I missing to make this get to the queue properly?

Thanks in advance!