Sending a message to a JMS queue/topic

In this recipe, we will create a Business Service which sends a message to either a JMS queue or to a JMS topic. Since writing to a queue and topic is very similar from the business service perspective, we decided to combine it into one single recipe. We will use and configure the JMS Transport provided by the Oracle Service Bus.

Getting ready

For this recipe, we will use the DestinationQueue or the DestinationTopic from the OSB Cookbook standard environment and implement a business service to send messages to the queue/topic. We will not implement the proxy service in this recipe and instead test the business service directly on the OSB console.

How to do it...

First let's create the JMSProducer business service ...

Get Oracle Service Bus 11g Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.