Using the Database Adapter in Oracle Service Bus 12c

03 Feb


Since the Oracle Service Bus is particularly good in handling high amounts of (small) requests very, very quickly it’s a perfect solution for entity/atomic services. In Oracle Fusion Middleware 11g the solution chosen to decouple a database was often using an Oracle SOA Suite 11g project with JCA and Mediator. However if you had specific requirements beyond basis mapping the Mediator component had it’s limits, and in the worst case you would need to extend the project with a BPEL process. From a developers perspective this is the “easy” solution since both the JCA component and Mediator are configured in JDeveloper 11g. And, the alternative, using JCA with OSB this would mean that you have to import the JCA configuration from JDeveloper 11g into your OEPE 11g. Which means more work. However my personal opinion is, that the SOA/Mediator choice is a “bloated” result for such a simple atomic service implementation. The OSB is much more suitable for atomic/entity services and SOA/BPEL should be used for orchestration purposes.

Lucky for us in Oracle Fusion Middleware 12c the development of simple atomic services to decouple a database in Oracle Service Bus 12c is less work due to tthe fact all features of OFMW are available to the developer in one IDE..


Getting Started

In this blogpost we will explain how to create an Oracle Service Bus 12c project that can act as a simple atomic service that can decouple your database.
Since a best practice is to NOT implement SQL code (INSERT, SELECT, UPDATE, etc) in your Middleware component we will use a simple PL/SQL package to communicate with the database.

First we will create a service bus project with the name getCaseService and drag the HTTP transport on the proxy service





Then drag the Database adapter on the external services and call it getCaseDB





The result will be a Oracle Service Bus project with both the newly created HTTP proxy service and the DB business service:


Then we can go and configure the pipeline. Here is a basic overview of the final result the pipeline will look like:


In the pipleline we will need 2 transformations for the request and response pipelne. In this example we will show XSLT instead of XQuery, but both are usable. First we create an XSLT for the request  pipeline transformation:






Finally we will also need to make sure the project has the response XSLT we can use for the response pipeline:





After we finalized the project we can now deploy our atomic/entity service to the IntegratedWeblogicServer and test the new service



Posted by on 03-02-2015 in Oracle, OSB


Tags: , , ,

5 responses to “Using the Database Adapter in Oracle Service Bus 12c

  1. Deb

    11-05-2016 at 16:31

    Excellent description !!!


Leave a Reply

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

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

Google photo

You are commenting using your Google 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.

%d bloggers like this: