Hello,
now you have hit the point. I was a little bit confused with your last problem (selectors). In your case you have to use a SessionCallback or a Producercallback. The reason is that temporary queues are only open within the session that has created it. So you have to use the same session for sending and receiving the message. (Otherwise the temporary queue is deleted while closing the session).
You can send and receive the message like you have done in your code.
Code:
public Object doInJms(Session session, MessageProducer producer) throws JMSException {
System.out.println("inside IPLJmsQueueRequestor");
TemporaryQueue queue = session.createTemporaryQueue();
TextMessage message = session.createTextMessage();
message.setText(strInput);
message.setStringProperty("service", strMessage);
message.setJMSReplyTo(queue);
producer.send(session.createQueue(queueName), message);
return session.createConsumer(queue).receive();
}
In this case you also don't need a selector to receive the message, because the temporary queue is dedicated to the session. So you should receive only and exactly one reply message inside the reply queue.
In your code you should think about of using a timeout while waiting for the external system. Because otherwise you will wait until the shutdown of the message system.
Hope this clarifies a little bit. If you have further questions feel free to ask.
rgds
agim