You can use the Oracle JDBC for OCI with Version 6.x of
the Application Server.
About this task
To create a data source in the Application Server that takes
advantage of the Oracle Call Interface (OCI), you might want to use
the Oracle JDBC OCI driver. This JDBC provider can be configured with
the Application Server.
Procedure
- From the administrative console, create the JDBC provider.
- Click .
- Select the scope for the JDBC Provider. The
scope can be set to a cell, node, or server level.
- Click Apply.
- Click New to create the JDBC
Provider.
- Configure the settings for the JDBC provider.
- In the Configuration tab, under
General Properties, configure the settings for an Oracle JDBC driver.
- In Step 1: Select the database type, select Oracle from
the list.
- In Step 2: Select the provider type, select Oracle
JDBC Driver from the list.
- In Step 3: Select the Implementation type, select Connection
pool data source or XA data source from
the list.
- Click Next.
- Specify a name and, optionally, a description, for the
JDBC provider.
- Enter database class path and
native library path information.
Best practice: Application
Server variables can be used in the class path or the native library
path. For example, you can use variables like ${ORACLE_JDBC_DRIVER_PATH}
and ${ORACLE_HOME} in the paths for the class path and native library
path, but you must define the variables ORACLE_JDBC_DRIVER_PATH and
ORACLE_HOME to the Application Server. Define or change the paths
for these variables in the administrative console by clicking .
bprac
- In the class path field, enter the following:
${ORACLE_JDBC_DRIVER_PATH}/ojdbc14.jar
- In the native library field, enter the following:
${ORACLE_HOME}/lib
where
ORACLE_HOME is configured to the location in which Oracle Network
client is installed.
- Click Apply.
- Create the data source in Application Server.
- Click .
- Enter the name for the data source.
- Enter the JNDI name for the data
source.
- Select the name of the data store
helper class that corresponds to the type of JDBC provider that you
configured.
- Select Component-managed
authentication alias and enter the database specific properties
for the data source.
- For the URL, enter the URL for
the data source. For example:
jdbc:oracle:oci:@<tnsname_alias>
The
value for <tnsname_alias> must be defined in the ${ORACLE_HOME}/network/admin/tnsnames.ora
file.
- Click OK and
save the configuration.