Friday, September 5, 2014

Oracle SOA Suite 12c: Quick database sync with DbAdapter

I found this use case from Oracle Community. A user wants to send records from one database to another when a row is inserted. To do this we can use DbAdapter for both purposes: Read a new row (Polling), and Insert a row.




Step by step

  1. Create Database Schemas
  2. Create Data Sources and DbAdapter connections
  3. Create SOA Application

GitHub: https://github.com/blog-jeqo/soa-dbadapter_polling

Create Databases

I'm using Flyway to create the database schemas:



This POM define the database connection properties and the plugin configuration.


Do this in both Applications: "SystemA_App" and "SystemB_App".

This will create two database schemas on Oracle XE Database. Could be any database supported by WebLogic JDBC DataSources.

Create Data Sources and DbAdapter connections

To do this we need to run the WLST scripts created on the "WLST_Scripts directory":

[SOA_HOME]/common/bin/wlst prepare_env_a.py
[SOA_HOME]/common/bin/wlst prepare_env_b.py

This will create a Data Source and a Connection Factory on DbAdapter:






Create SOA Application

Now we have the 2 schemas up, we can create the SOA Application. This is the desired composite:




No comments:

Post a Comment