Domanda

While using a soap/jms web service , i am using an EJB deployed on a WAS as my client. My service endpoint is a tibco ems queue. To call the service, i construct a SOAP messgae and drop it on the queue.

But my confusion is: How can the 'queue' send me back a response? I understand how http request response works, but with queue (I only have experience with traditional MQ), I don't know how queue can return a proper resposne to the publisher.

Let us say there is an MDB that consume the message from the queue, invokes the service method and then puts the response back on the queue? And then the queue sends the response back to the client?

È stato utile?

Soluzione

The response will be sent back on a different queue or topic, which is specified in a property of the request message.

The response queue/topic can be set in the request message using the method msg.setJMSReplyTo(destination) (http://docs.oracle.com/cd/E17802_01/products/products/jms/javadoc-102a/javax/jms/Message.html#setJMSReplyTo%28javax.jms.Destination%29).

When using the QueueRequestor to send the request, as usual and recommended, then a temporary queue is created for each individual request-reply interaction.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top