If you are using Oracle for the monitoring and recovery database, you can use Oracle’s Type 2 driver, the Oracle Call Interface (OCI) driver. This requires some additional steps. BPM typically uses a DataDirect® driver to establish a database connection and interact with the database server. This section provides the requirements and instructions for enabling and configuring BPM for the OCI driver.
The OCI driver works in conjunction with the monitoring and recovery database only. The Worklist Manager uses the DataDirect driver only.
The Oracle OCI driver is also called the thick driver because of the extensive native code it uses to communicate with the database. OCI is written in C; all of its Java calls use JNI to direct the calls to the C layer. The C layer communicates with the database and returns the results to the Java layer.
The library to map the Java calls to C calls is installed with the Oracle client’s installation. To enable monitoring and recovery persistence with OCI, you must install the Oracle client software.
Before configuring the OCI driver, make sure the following are in place.
The Oracle database is running and you can access the database using a SQL Plus client. Also ensure that the BPM Engine connects to an Oracle database server. Test the connection by configuring the engine for persistence using the DataDirect driver and verify that the monitoring and recovery database tables have been successfully populated.
The Oracle client is installed and tnsnames.ora has an entry connecting to the Oracle database. Installing the Oracle client installs all the necessary libraries for database interactions and connection with the OCI driver.
If you are connecting to an Oracle database server older than version 9.2, obtain a patch from your DBA to update the Oracle client for backward compatibility. Without the appropriate backward compatibility patch, the Oracle client cannot communicate properly with the older database server, and unpredictable behavior might result.
In order to create connections to an Oracle database using the OCI driver, the OCI client version and the JDBC driver version must match. If the versions are not the same, testing or opening the connection fails. Depending on the version of the OCI client, one of the following errors could occur:
Character Set Not Supported !!: DBConversion oracle.jdbc.oci8.OCIEnv.envCharSetId java.lang.NoSuchFieldError: oracle.jdbc.oci8.OCIEnv.envCharSetId |
Implementing the OCI driver involves the following tasks:
In order for BPM to use the OCI driver, the library file must reside in the Logical Host’s library directory.
Install the Oracle client on the system where Logical Host resides.
Define the monitoring and recovery database in tnsnames.ora.
Copy ojdbc14.jar (for JDK 1.4 or later) or classes12.jar (for JDK 1.2 and 1.3) from the /jdbc/lib subdirectory in the Oracle client installation to the /lib subdirectory in the Logical Host domain-specific directory. For example,
copy from oracle_home\jdbc\lib
to logical_host\is\domains\domain1\lib
|
The location of the files in the Oracle installation varies depending on the version of Oracle being used and whether it is a client or server installation.
Restart the Logical Host instance to load the driver classes.
To enable the OCI driver with the BPM Engine, set the following environment variables.
oracle_home refers to the directory where the Oracle client or database is installed. For example, C:\oracle\ora92 or /home/oracle/orahome. This folder contains sub-folders such as bin, network, jdbc, jlib, and lib.
For Windows operating systems:
Set the oracle_home environment variable.
Add oracle_home\lib to the system PATH.
Add oracle_home\bin to the system PATH.
For Linux and Unix operating systems (except HPUX and AIX):
Set the oracle_homeenvironment variable.
Add oracle_home/lib to the LD_LIBRARY_PATH environment variable.
Add oracle_home/bin to the PATH environment variable.
For HP-UX:
Set the oracle_home environment variable.
Add oracle_home/lib to the SHLIB_PATH environment variable.
Add oracle_home/bin to the PATH environment variable.
For AIX:
Set the oracle_home environment variable.
Add oracle_home/lib to the LIBPATH environment variable.
Add oracle_home/bin to the PATH environment variable.
You must configure the BPM Engine to use the OCI driver instead of the default thin driver. This is configured in the Environment Explorer in the integration server properties sheet.
In the Environment Explorer, right-click the integration or application server, and then click Properties.
Click BPM Engine Configuration.
On the Properties dialog box, enter the service name in the Oracle Net Service Name field.
The value to enter is the TNS name configured in the tnsnames.ora file (located at <oracle_home>/network/admin). The following example shows a typical TNS name configuration where ORCL.STC.COM is the Oracle Net Service Name.
ORCL.STC.COM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = MyHost)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = orcl) ) |
Fill in the properties.
Click OK.
The following table describes the fields you must configure in the BPM Engine Configuration properties.
Description |
|
---|---|
An indicator of whether persistence is enabled. Select one of the Persist to Database options to enable persistence in BPM. |
|
The database platform in use. Select the correct version of Oracle to enable the OCI feature. |
|
The name of the computer on which the Oracle database resides. |
|
The port on which the Oracle database is listening. The default is 1521. |
|
The TNS name of the database (from the tnsnames.ora). The BPM Engine uses the OCI driver if this property is populated. Otherwise, the BPM Engine uses the default DataDirect driver. |
|
The name of the database. |
|
The user name to access the monitoring and recovery tables. |
|
The Password to access the monitoring and recovery tables. |
Oracle RAC is an Oracle database that has two or more instances accessing a shared database using cluster technology. A cluster is a group of machines (or nodes) that work together to perform the same task. To support this architecture, two or more machines that host the database instances are linked by a high-speed interconnect to form the cluster. The interconnect is a physical network used as a means of communication between each node of the cluster.
After Oracle RAC is installed, the Transparent Application Failover (TAF) feature can be configured to ensure the highest levels of availability. TAF compliments all levels of the availability hierarchy. Applications and users are automatically and transparently reconnected to another system, applications and queries continue uninterrupted, and the login context is maintained. Oracle Net Services is configured to allow the listener on each database instance of RAC to failover in case of failure.
Setting up the Oracle RAC/OPS system to test the TAF feature is beyond the scope of this document. Please contact your DBA to set up the Oracle RAC/OPS server with the configuration in the tnsnames.ora and listener.ora files.
The OCI driver works in conjunction with the BPM Engine only. The Worklist Manager uses the DataDirect driver only.
Set up the Oracle RAC server with the multiple hosts or instances sharing the same data storage.
For information about configuring tnsnames.ora to enable the TAF feature when using the OCI driver, see Before You Begin.
If you have not already done so, install Oracle client locally where the Logical Host is running.
Oracle client must be installed for OCI to work. Since the OCI driver establishes connectivity to the database based on a native C call, the same version of the Oracle client must be installed as packaged with BPM. Version conflicts for OCI would result in problems configuring the OCI driver with BPM.
Configure the tnsnames.ora file for TAF.
Below is an example of a tnsnames.ora file configured for a transparent application failover (TAF).
Option 1: Connect time FAIL OVER and TAF
MY_CLUSTER = (DESCRIPTION = (FAILOVER = ON) (LOAD_BALANCE = OFF) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Node1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = Node2)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = my_cluster.my_company.com) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = PRECONNECT) (BACKUP=Node2) ) ) ) |
Option 2: TAF configuration
MY_CLUSTER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Node1)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = my_cluster.my_company.com) (FAILOVER_MODE = (TYPE = SELECT) (METHOD = PRECONNECT) (BACKUP = Node2) ) ) ) |
In the above configuration, MY_CLUSTER has the knowledge of the two nodes that are configured to act as a cluster. The cluster should be configured to share the same disk by RAC/OPS.
In option 1, FAILOVER is set to ON and LOADBALANCE is set to OFF. This is the configuration for a connect time failover. In connect time failover, when the OCI driver tries to connect to Node1 and determines that the node is down, it connects to the other host in the Address list (Node2). Option 2 is shown only to illustrate configuring just the TAF feature in the OCI client. For BPM, both the connect time failover and the TAF configuration is required.
Configuring the TAF option involves adding Oracle Net parameters to the tnsnames.ora file and the use of parameter values to ascertain the next step in the failover process when one of the participating nodes encounters failure. The parameter that drives the TAF option is the FAILOVER_MODE under the CONNECT_DATA section of a connect descriptor. By using one or more of the following parameters, the full functionality of TAF can be achieved.
To aid in troubleshooting, common error messages and resolutions are described below.
Table 3 Troubleshooting Windows SystemsTable 4 Troubleshooting Linux/Unix Systems