Oracle Service Bus, JMS Request/Response pattern

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)

wls_resources

Create the osb resource

  • Create a new proxy service, JMSRequestResponsePS
  • ps_1
    ps_2
    For the Endpoint URi, insert the url to In-queue
    ps_3
    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
    ps_4

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.

Original blog

Popularity: 4% [?]

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

7 Responses to “Oracle Service Bus, JMS Request/Response pattern”

commenter

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.

Eric Elzinga | May 2nd, 2010 at 8:55 am
commenter

So all messages must be forwarded to both queues? (duplicated?)

commenter

yeahh…it’s completely true..

commenter

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?

Eric Elzinga | May 2nd, 2010 at 9:25 am
commenter

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.

commenter

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

commenter

Hi, I’m new in JMS and OSB and testing this scenario.
Could you write for me sample test message for MyQueueIn?

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>