Book Image

Oracle Service Bus 11g Development Cookbook

Book Image

Oracle Service Bus 11g Development Cookbook

Overview of this book

Oracle Service Bus 11g is a scalable SOA integration platform that delivers an efficient, standards-based infrastructure for high-volume, mission critical SOA environments. It is designed to connect, mediate, and manage interactions between heterogeneous services, legacy applications, packaged solutions and multiple Enterprise Service Bus (ESB) instances across an enterprise-wide service network. Oracle Service Bus is a core component in the Oracle SOA Suite as a backbone for SOA messaging. This practical cookbook shows you how to develop service and message-oriented (integration) solutions on the Oracle Service Bus 11g. Packed with over 80 task-based and immediately reusable recipes, this book starts by showing you how to create a basic OSB service and work efficiently and effectively with OSB. The book then dives into topics such as messaging with JMS transport, using EJB and JEJB transport, HTTP transport and Poller transports, communicating with the database, communicating with SOA Suite and Reliable Message Processing amongst others. The last two chapters discuss how to achieve message and transport-level security on the OSB.
Table of Contents (19 chapters)
Oracle Service Bus 11g Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Consuming messages from a JMS queue


A message in a queue can only be consumed by a single consumer. To consume a message on the OSB, a proxy service with the JMS Transport needs to be setup.

In this recipe, we will show how to implement a proxy service as a message consumer for the queue. The proxy service will act as a listener on the JMS queue and will get active as soon as a message can be consumed from the queue.

Getting ready

For this recipe, we need one queue from the OSB Cookbook standard environment and will then implement the proxy service to dequeue the messages from the queue.

How to do it...

Let's create the proxy service to consume messages from the SourceQueue. In Eclipse OEPE, perform the following steps:

  1. Create a new OSB project consuming-from-jms-queue and create a proxy folder within it.

  2. Create a new proxy service and name it JMSConsumer.

  3. Navigate to the General tab.

  4. Set the Service Type option to Messaging Service.

  5. Navigate to the Messaging tab

  6. Set the Request Message Type option...