Hitachi

uCosminexus Application Server System Setup and Operation Guide


4.1.7 Setting the database connection environment (setting Oracle)

Use DB Connector as the resource adapter to connect to the database from J2EE application. JDBC driver that supports the database is necessary to connect to the database using DB Connector.

This subsection describes the settings of the database connection environment necessary for connecting to Oracle by using DB Connector. JDBC driver uses Oracle JDBC Thin Driver. Execute these settings on the host for allocating the J2EE Server.

For details on the notes on setting up a database, see 4.1.9 Notes on setting up a database.

Organization of this subsection

(1) Preparing Oracle JDBC Thin Driver

This subsection describes the necessary settings on the J2EE server when using Oracle JDBC Thin Driver. Note that when using Oracle JDBC Thin Driver, no environment variable is to be added to the J2EE Server.

Acquire the JAR file of Oracle JDBC Thin Driver of the version supported by Application Server. Information on how to install the Oracle client on the machine that operates the J2EE Server is available as an actual example of how to acquire Oracle JDBC Thin Driver. The following is the outline of the procedure to install the Oracle client:

  1. Install the Oracle client of the version number supported by Application Server, on the machine that operates the J2EE Server.

    In such cases, Oracle JDBC Thin Driver is also installed.

  2. Apply the patch of the patch level (patch number) supported by Application Server.

  3. Specify the path of the JAR file of Oracle JDBC Thin Driver in the Easy Setup definition file.

    Add the path of the JAR file of Oracle JDBC Thin Driver in the configuration tag in the J2EE server definition of physical tier definition (definition of tier tag) when creating the Easy Setup definition file. For details on creating the Easy Setup definition file, see 4.1.20 Setting the Easy Setup definition file. For details on settings, see 4.3 Easy Setup definition file in the uCosminexus Application Server Definition Reference Guide.

  4. Import DB Connector for Oracle JDBC Thin Driver to the J2EE Server.

    For details on importing DB Connector, see 4.1.26 Setting DB Connector (when using CUI).

    There are 2 types of DB Connector for Oracle JDBC Thin Driver. Select either of the following files depending on the transaction management method:

    DBConnector_Oracle_CP.rar

    Select DBConnector_Oracle_CP.rar when you are using without local transaction or transaction management (when specifying LocalTransaction or NoTransaction in the support level of transaction). Connect to the database by using the ConnectionPoolDataSource of Oracle JDBC Thin Driver.

    DBConnector_Oracle_XA.rar

    Select DBConnector_Oracle_XA.rar when you are using a global transaction (When specifying XATransaction in the support level of transaction) Connect to the database by using XADataSource of Oracle JDBC Thin Driver.

    For details on the transaction management method, see 3.4 Transaction Management in the uCosminexus Application Server Common Container Functionality Guide.