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.

Setup:

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

jmsmodule

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

jmsmodule1

  • Select all target servers and click Next.

jmsmodule2

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

jmsmodule3

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

connfactory1

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

connfactory1

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

connfactory2

  • Click New and select type of resource as Queue.

queue1

  • Click Next and give name for Queue and JNDI.

queue2

  • Click Next and proceed to create new Sub Deployment.

queue3

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

queue4

  • Select an existing target JMS server and click Finish.

queue5

  • Verify that JMS queue is created in DemoJMSModule.

queue6

Using JMS Transport at Business Service:

  • Create a XML based business service.

bs1

  • 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.

bs2

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

bs3

  • 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.

jms1

  • Click on specific message to verify.

image

Advertisement

9 Responses to “Using JMS transport in OSB”


  1. 1 Priya October 5, 2018 at 3:02 PM

    Hi,

    I tried the JMS transport in my sample Project

    The invocation resulted in an error: oracle.tip.adapter.jms.JmsConnectionFactory cannot be cast to javax.jms.Destination.

    getting an above error..
    Do u know the reason for this?

  2. 2 vinay September 23, 2016 at 1:27 PM

    I did the same steps but i am getting following error:

    Error Message

    The invocation resulted in an error: [JMSPool:169803]JNDI lookup of the JMS connection factory jms.demo.DemoConnectionFactory failed: javax.naming.CommunicationException: t3://localhost:7001: [RJVM:000575]Destination 0:0:0:0:0:0:0:1, 7001 unreachable.; nested exception is:
    java.net.ConnectException: Connection refused; [RJVM:000576]No available router to destination.; nested exception is:
    java.rmi.ConnectException: [RJVM:000576]No available router to destination. [Root exception is java.net.ConnectException: t3://localhost:7001: [RJVM:000575]Destination 0:0:0:0:0:0:0:1, 7001 unreachable.; nested exception is:
    java.net.ConnectException: Connection refused; [RJVM:000576]No available router to destination.; nested exception is:
    java.rmi.ConnectException: [RJVM:000576]No available router to destination.].

  3. 4 vikas August 14, 2013 at 12:19 AM

    good one … thanks for posting

  4. 5 Anonymous July 3, 2013 at 1:34 PM

    I also I think that the images are very very small

  5. 7 Anonymous June 19, 2013 at 8:53 PM

    Images are too small to read.


  1. 1 Using JMS transport (Contd..) « Siva's Blog Trackback on May 21, 2011 at 3:06 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.




Pages

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

Join 379 other subscribers

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


%d bloggers like this: