This is the first of a 5 part series that explains how to expose a database to an Oracle BPM 12c Process using the Oracle SOA Database Adapter and a Mediator.
Part 1 - Create a WebLogic JNDI Database Connection
This explains how the WebLogic JNDI connection to a database schema is created. In the next two posts, you will see how the Database Adapter can use this connection once it has been created. This simply describes the steps that are necessary to configure the JNDI connection initially.
Components exposed in a SOA application can be exposed as a service, and a call to the database is no exception. In order to invoke the database from a BPM process, it first has to be exposed as a service.
First, a datasource needs to be created. You need the database schema's datasource configured to create the JNDI connection information needed to access it. If all you want to do is to access the data from ADF, this is all you would need.
Where the database adapter comes into play, however, is when your project's composite needs to access it as a service (e.g., when a composite's Mediator needs to connect to the database adapter). In the fourth part of this series, the Database Adapter SOA component will be dragged into the External References column of your composite diagram. For this to succeed at runtime, the datasource's JNDI connection to the datasource has to first be added to the database adapter's DBAdapter deployment. This will be done in part 3 of this series.
This example uses the HR schema that comes that is preinstalled with the Oracle XE 11g or 12c SE database, but these same steps could be used to expose other database schemas.
1. Open the WebLogic Console (e.g., https://www.avioconsulting.com/:7001/console), and log in.
2. In this step, the source of the data is configured as a datasource to the SOA infrastructure. This datasource provides the connection to the actual underlying data provider. Configure the JDBC Datasource in the WebLogic by selecting Services -> Data Sources.
3. Click New -> Generic Data source.
4. JNDI stands for Java Naming and Directory Interface. This is a standard interface for the Java based application clients to access the underlying naming and directory services like DNS, LDAP, JMS and database schemas. This allows a client to access different services in a standard way regardless of their underlying technology.
Take note of the JNDI name being entered in this step. It will be something like "jdbc/myDBSourceName" (remember this text for a later step). This is a multi-step wizard, and in the last step be sure to point it to the correct server by clicking the appropriate checkbox in the list.
Configure the JDBC datasource to point to the HR schema that comes with Oracle 11g and 12c databases. Note the JNDI name of the JDBC datasource: jdbc/hr. This value is going to be used later to configure the Connection Pool. In this example, the JDBC name is set to HR (step 1 below), the JNDI name is set to jdbc/hr (2 below – this is case sensitive). Click Next (3 below) to continue.
For Oracle XE or SE, set the driver to "Oracle's Driver (Thin XA) for instance connections...". Click Next.
For an Oracle XE or SE development test environment, leave the "Supports Global Transactions" checkbox unchecked (an error will occur at runtime if you check it). Click Next.
For the HR schema installed on an Oracle XE database, enter XE as the Database Name, otherwise enter ORCL -> for a test development environment, enter localhost as the Host Name -> set the Database User Name to HR -> set the Password and Confirm Password fields to the password for the HR schema -> click Next.
Click the Test Configuration button and verify that it tested successfully.
If you have a separate SOA managed server installed in your development test environment, select the checkbox beside the soa_server server -> click Finish.
Having done this, you should now see the new data source in the list with these settings.
If you were not going to use the SOA Database Adapter to connect to the database, you could stop here. Because in the next few blogs in this series uses this adapter to access customer information, the next blog in this series shows you how to add the JNDI connection information you created here to the Database Adapter.