Queues and topic are used for message persistence and guaranteed delivery. In this post I will show you how to integrate with JMS queue in Oracle Service Bus. We use JMS adapter to connect to JMS queue or Topic in SOA but in Oracle Service Bus we use JMS protocol to connect to JMS Queue or Topic.
In this post, I will show you how to send message to JMS Queue from Oracle Service Bus, for this we will create a business service which sends the message to JMS Queue.
We have created a JMS queue to that Oracle Service Bus business service will send the message.
Now create a new Oracle Service Bus project and create a new business service under newly created project.
Name your business service and choose “Messaging Service” as Service Type for the business service.
Choose Request message type that you are sending to JMS queue. Here we are sending simple text message so we will choose “Text”. Response Message Type will be “None” as this is one-way process so we don’t need any response message.
Choose “jms” from protocol dropdown and provide JMS queue Endpoint URI.
Take special care while specifying queue Endpoint URI.
It is JNDI name of Connection factory, if you are using default connection factory then this will be equal to “Weblogic.jms.XAConnectionFactory” and if you are using any custom connection factory then you have to mention connection factory JNDI name.
Let’s suppose you are using below connection factory for your queue.
Connection Factory Name- SampleCF
Then your FactoryJNDIName will be “jms.SampleCF”.
It is JNDI name of JMS queue. We are following JMS queue.
JMS Queue- SampleQueue
JNDI – jms/SampleQueue
So our DestJndiName will be “jms.SampleQueue”.
Choose destination type, we choose “Queue” as we are sending message to JMS queue.
Choose Message Type, we should choose “Text” as we are sending text message.
Accept defaults and save the business service. Activate the session.
To check the JMS queue messages, click on “Monitoring” tab.