Tuesday, July 26, 2011

Use DbAdapter in Oracle SOA 11g BPEL


There 3 steps to do in order to successfully use DBAdapter to access the database in Oracle Bpel.
  1. Add BPEL Services/Database Adapter to your BPEL in JDeveloper. This will start Adapter Configuration Wizard. In step 3 of this wizard you will asked to create a database connection and assign a JNDI name to this connection as shown in the below figure. This JNDI name sometimes is confused with the data source JNDI name in JEE server. This JNDI name is used by the JCA adapter and in this case the JCA adapter is DBAdapter in Oracle SOA. After the successful configuration of DBAdapter several files are generated and one of these file is: .jca file. When you open this file you will notice that the JNDI name assigned in Adapter Configuration Wizard appear as the value for the location attribute of connection-factory element in the .jca file.
  2. After you finish the work in JDeveloper side you need to configure the JCA adapter before the DbAdapter can successfully be bound by BPEL to establish the JCA connection to the database. It can be done through Weblogic Administration Console. Click on Deployments under your domain in Console and then click on DbAdapter in the right panel and then click on Configuration tab and then click on Outbound Connection Pool tab.
    Click on New button and then select javax.resource.cci.ConnectionFactory as Outbound Connection Group and then click on Next button.
    Here you should type in your JNDI Name for this Outbound Connection. This JNDI name should be the same as the JNDI name you use in the first step, i.e. the value used for the location attribute of connection-factory element in the .jca file.
    Finally click on Finish button to create JCA connection factory instance.
    Now back to the panel of Outbound Connection Pool and expand the group javax.resource.cci.ConnectionFactory and you will see the connection factory instance you just created.
    Click on this instance and then click on Properties tab and type in dataSourceName. The value of this property is the actual JNDI data source name we use in normal JEE server.
    And then click on Save button.
  3. Last step is to create normal JEE data source and you can do it from Oracle Weblogic Administration Console. But the data source JNDI name should be the same as the value we use for the property dataSourceName in step 2.

After all these steps are done now you can access the database though DbAdapter in BPEL.



1 comment:

  1. we are having issue with DB adapter while reading decimal values from Netezza database. The DB adapter is reading the data in an exponential format i.e. data as '0E-8' for '0.00000000'. As these values are not acceptable by target (RP), we are using format-number function in the transformation to provide exact value in the output xml. But the problem is, in this case we are having schema validation error in TST. Please Help

    ReplyDelete