Tuesday, July 27, 2010

JMS request/response scenario in Oracle Service Bus

log in to the OSB admin console

http://host:port/console

Go to SErvices->Messaging-->JMS Servers and create a new JMS Server



Target it to your managed server.

Again create a JMS module and target it to your Admin and managed server.



Now go inside your module that you have created now and create a connection factory





Now create two queue one for request and one for response.

Create request queue and subdeployment for it which points to the JMSServer which we have created earlier



Create response queue in similar way pointing to the same subdeployment



Now once done you should see these three resources in your panel



Now admin console work is over.

Now log in to the osb console

http://host:port/sbconsole and create a proxy service for jms Request Reply scenario

Create a folder and within that create a proxy service as shown below



Give it some logical name and say next



Now choose the jms option in protocol and then provide the url for your queue

It should be in following format

jms://(host:port)/Connection factory name/QueueJndi name

So i have used the following properties in my case

jms://localhost:7001/MyConnectionFactory/jdbc/RequestQueue

Here my host is local host
port is 7001

Connection factory name is MyConnectionFactory

and jndi name for Request Queue is jdbc/RequestQueue



Now choose response required as yes and provide the url for the response queue this should be same as that of request queue we have seen earlier only thing is that you have to use the jndi for repsonse queue.

ONce done save these changes and activate it.



Now put a data in request queue wait for few seconds and you will find the data is transferred to response queue.

2 comments:

Yatan said...

I think in the admin console we also need to deploy it.

Mikku said...

This has worked at my end without deploing it to admin console