579 total views, 1 views today
Database Adapter configuration in WebLogic Server
Oracle database adapter is a JCA connector, which is a DBAdapter.jar file deployed to the WebLogic server during the installation of FMW. The DB adapter enables the Oracle SOA Suite application (ex: a BPEL process) communicate to the Oracle database via a JNDI data source. The DB adapter relies on the JDBC driver to establish communication. The interaction between the SOA application to the Oracle database via the DB adapter is XML message. The DB adapter received XML message from SOA apps and response back XML message to SOA apps, so it is loosely modeled and it easily plugs into SOA application.
DB adapter can consist of multiple instances, Each instance (example: eis/DB/HR ) points to a single database and the instance must map with a JNDI data source to connect to Database.
In this section, we talk about how to create a JDBC data source and a DB adapter in Weblogic 12C. I have used HR Schema comes with Oracle database
Oracle WebLogic 12C
HR Schema (Bundles with Oracle database)
Create JDBC Datasource
Login into the WebLogic Server
Expand Services >> Click New >> Select Generic Data Source
Input a Name >>input a JDBC Name (format is jdbc/<SCHEMANAME>) >> Database type as Oracle >> Click Next
Note: Copy this JNDI name in a notepad file, we need this name to configure DB adapter
Click driver as Oracle >> Click Next
Input the Database connection configuration >> Click Next
Click the button Test Configuration >> Verify the connection result
Enable the server >> Click Finish
Note: Please point the server where you want to have the data source available. You may enable datasource to AdminServer, Cluster, Managed servers based upon how WebLogic configured.
The JDBC Data Sources wizard will list the data source that we created above
Configure datasource in DBAdapter
Click on the Deployments >> Click Next >> Click DbAdapter
Click Configuration >> Click Outbound Connection Tools >> Click New
Input your instance name (eis/DB/HR), You will need this name in your SOA application to create DB Adapter
It will display the successful message >> Click Ok
Now click the Configuration >> Outbound Connection Pools >> Click the instance (eis/DB/HR) we created above
Click on the propertyValue against the XADataSourceName >> Input the JNDI name (jdbc/HR) >> Hit Enter button on your keyboard >> Click Save
Note: we highlighted the JNDi name in green colour above
You will notice the successful message as shown below >> Click Save
Click Deployments >> Click Next >> Enable the checkbox for DBADapter >> Click Update
Click the box ‘Update this application in place with new deployment plan changes. (A deployment plan must be specified for this option)’ >> Click Update
Note: If you are configuring the DB adapter in a clustered environment then copy the plan.xml file to the other machine before the update. The plan.xml file location is mention in the Deployment Plan path as shown in the picture below
Success message appears on the screen, Restart the WebLogic server for the changes take effect
That’s it. We have configured a database connection in DBAdapter. Now use this DB adapter information in your SOA application. Click here for instructions to create an SOA project (BPEL) that connects a DB adapter instance.
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017