Inspired by the article of Edwin about JMS Request Reply Interaction Pattern in Soa Suite 11g, i will show a little example of what functionality Oracle Service Bus supplies to implement the jms request/response (reply) pattern.
The solution is quiet simple.
Create the wls resources
- Create JMS Server, MyJMSServer
- Create JMS Modules, MyJMSResources
- Create a Connection Factory, MyConnectionFactory
- Create 2 queues, MyQueueIn (request message), MyQueueOut (response message)
Create the osb resource
- Create a new proxy service, JMSRequestResponsePS


For the Endpoint URi, insert the url to In-queue

Check the ‘Is Response Required’ option.
We will use JMSCorrelationID for the Response Correlation Pattern.
For the Response URI, insert the url to the Out-queue
Testing
Now test the flow by insert a little xml message in the MyQueueIn queue, wait a few seconds and check the MyQueueOut queue.
Only thing what’s left is to fill in the message flow of the proxy service and add some logica.
Popularity: 4% [?]




7 Responses to “Oracle Service Bus, JMS Request/Response pattern”
Hi eric, very useful post, I have another case, I must listen from one queue then forward every message to two different queue, how could I do that?, Now I already made one business service, but it only forward to one queue only.
Really thanks in advance.
So all messages must be forwarded to both queues? (duplicated?)
yeahh…it’s completely true..
additional info : in my case, osb need to listen that queue and forward it to multiple application (with different queue too), who consumes the same message for different needed.
any suggestion?
Since you don’t need any logic based on the messages, i would say you could make us of the ‘Store-And-Forward’ mechanisme in the Weblogic Server itself. See this : http://download.oracle.com/docs/cd/E12840_01/wls/docs103/saf_admin/config_jms.html
Is that what you need? Don’t think you need osb in here, since you you don’t execute logic on the messages. If you do want to let all the messages get processed by some OSB process, you could always use a for-each loop and do several service call outs in it. So you don’t route to the business service but you do several call outs,depending on the amount of the ‘consumers’ you have.
Hi eric, thanks for your aid, I prefer publish to service callout, and it works great now…
I think the best approaching is using SAF but I’m still learning on it :d.
Thanks
K
Hi, I’m new in JMS and OSB and testing this scenario.
Could you write for me sample test message for MyQueueIn?