Posts Tagged 'Transport'

Using JMS transport in OSB

We use JMS queues for reliable messaging or for asynchronous communication with other legacy systems or third party systems. The JMS queues can reside in local WLS or in remote server. Here, in this post we discuss about using JMS transport in OSB and demonstrates the same using queues in local WLS. You can refer to this link for more explanation on different JMS Resources. And the OSB project used for demonstration can be downloaded from this link.

JMS queues are always referred in context of a Connection Factory, so you need to create Connection Factory first and then actual JMS queues.

In OSB, JMS transport is used to either enqueue or read messages(poll) from JMS queues. To enqueue the messages, use JMS transport in business service and to poll/read messages from JMS queue, use JMS transport in proxy service.


  • Open WLS Admin console and navigate to Home -> Messaging -> JMS Modules. Click ‘New’ to create new JMS module.


  • Enter name for this new JMS module and click ‘Next’.


  • Select all target servers and click Next.


  • Click Finish and verify new JMS module has been created successfully.


  • Now you can proceed to create Connection Factory and JMS Queue. Navigate to DemoJMSModule–> New and select Connection Factory.


  • Click Next and give name for both Connection Factory and JNDI.


  • Click Next. The target server will be selected automatically for connection factory. Click Finish.


  • Click New and select type of resource as Queue.


  • Click Next and give name for Queue and JNDI.


  • Click Next and proceed to create new Sub Deployment.


  • Provide name for this new sub deployment and click OK.


  • Select an existing target JMS server and click Finish.


  • Verify that JMS queue is created in DemoJMSModule.


Using JMS Transport at Business Service:

  • Create a XML based business service.


  • Go to Transport tab and select protocol as JMS. Observe that endpoint URI pattern:

          jms://<hostname>:<port>/<JNDI of connection factory>/<JNDI of queue>

  • If JNDI name has ‘/’, then it should be replaced with ‘.’, while specifying endpoint URI in business service.


  • Navigate to JMS Transport tab. Select Queue  as destination type, Text as message type and None as response queue.


  • Now you are done with business service. So deploy OSB project and test by giving any sample XML or text message in test console. To view messages in queue, navigate to Home->Messaging->JMS Modules-> DemoJMSModule->DemoQueue-> Monitoring. Select the queue and click on Show Messages to see all messages.


  • Click on specific message to verify.



Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 380 other subscribers

Enter your email address to follow this blog and receive notifications of new posts by email.

%d bloggers like this: