uCosminexus Application Server, Application Setup Guide

[Contents][Index][Back][Next]

4.3.2 Setting the DB Connector for a member resource adapter

Use the following procedure to setup a DB Connector for a member resource adapter:

  1. Import the DB Connector for the member resource adapter.
  2. Define the properties.
  3. Deploy the DB Connector for the member resource adapter.
  4. Check the connectivity.
Organization of this subsection
(1) Importing the DB Connector for member resource adapter
(2) Defining DB Connector properties for member resource adapter
(3) Deploying the DB Connector for member resource adapters
(4) Testing the connectivity of the DB Connector for a member resource adapter

(1) Importing the DB Connector for member resource adapter

Execute the following command to import the DB Connector for the member resource adapter:

Execution format

cjimportres [server-name] [-nameserver provider-URL] -type rar -f file-path
 

Specify the RAR file in file-path.

The RAR file is stored in the following directory:

The RAR files to be imported as member resource adapters are explained below:

DBConnector_Oracle_CP_ClusterPool_Member.rar
The DBConnector_Oracle_CP_ClusterPool_Member.rar is a member resource adapter of the cluster connection pool. Use this RAR file when you use a local transaction or when you do not use a transaction (when LocalTransaction or NoTransaction is specified in the transaction support level). Connect to Oracle by using ConnectionPoolDataSource of Oracle JDBC Thin Driver.
You cannot set this RAR file in the resource references of the J2EE applications.

Example of execution
cjimportres MyServer -type rar -f "c:\Program Files\Hitachi\Cosminexus\CC\DBConnector\ClusterPool\DBConnector_Oracle_CP_ClusterPool_Member.rar"
 

For details on the cjimportres command, see cjimportres (Importing resources) in the uCosminexus Application Server Command Reference Guide.

(2) Defining DB Connector properties for member resource adapter

You define the DB Connector properties for the member resource adapter. For the procedures to define the properties, see 4.2.2 Defining the DB Connector properties. The DB Connector property settings for the member resource adapters will be explained here.

(a) General information regarding the DB Connector for member resource adapters

The following table describes the settings for general information attributes (<outbound-resourceadapter> tag) of the DB Connector that can be set:

Items Mandatory Corresponding tags
Transaction support level# Y <transaction-support>
Scope of re-authentication support Y <reauthentication-support>

Legend:
Y: Mandatory

#
Specify the same transaction support level for the member resource adapters that form one cluster connection pool.

For details on the property settings, see 4.1.1 Contents of the HITACHI Connector Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.

(b) Configuration properties for member resource adapters

The configuration properties (<config-property> tag) and settings of DB Connector for member resource adapters are the same as that of the corresponding resource adapter (DBConnector_Oracle_CP.rar) . For the configuration properties of the corresponding resource adapters, see 4.2.2 Defining the DB Connector properties.

(c) Runtime properties

The following table describes the settings for runtime properties (<outbound-resourceadapter> - <connection-definition> - <connector-runtime> tag) of the DB Connector for the member resource adapter:

Items Corresponding tags
Property name <property-name>
Property data type <property-type>
Property value <property-value>

Repeat the above settings for all the properties that you want to define.

Setup the following items in the property name (<property-name>):

Property items Settings of property name (<property-name>)
User name# User
Password# Password
Minimum number of connections to be pooled in the connection pool MinPoolSize
Maximum number of connections to be pooled in the connection pool MaxPoolSize
Choose whether to output the log LogEnabled
Period from the last usage of connection until you determine whether to cancel the connection automatically (connection sweeper) ConnectionTimeout
Interval for canceling the connection automatically (connection sweeper) SweeperInterval
Maximum waiting time when the connection acquisition requests (when the connections are used up) are managed in a queue RequestQueueTimeout
Choose whether to enable alert output for monitoring the connection pool WatchEnabled
Interval for monitoring the connection pool WatchInterval
Threshold value for monitoring the usage state of the connection pool WatchThreshold
Choose whether to output the file with the connection pool monitoring results WatchWriteFileEnabled
Interval for operating the connection count adjustment function ConnectionPoolAdjustmentInterval
Choose whether to enable the warming up function of the connection pool Warmup

#
Specify the same user name for the member resource adapters that form one cluster connection pool.

Note:
The following items are always 'Enabled' regardless of the scope of settings for the member resource adapters:
Property items Valid values Settings of property name (<property-name>)
Minimum number of connections to be pooled in connection pool Connection pooling function is enabled. Default value 10 is assumed even if '0' is specified in 'MinPoolSize' and 'MaxPoolSize'. MinPoolSize
Maximum number of connections to be pooled in connection pool MaxPoolSize
Choose a method to check whether a failure has occurred in the connections inside the pool Always '1' (Failure detected when the connection is acquired) ValidationType
Choose whether to manage the connection acquisition requests in a queue when the connections are used up Always 'true' RequestQueueEnable
Choose whether to enable the timeout of the network failure detection function Always 'true' NetworkFailureTimeout
The retry function for acquiring connections is always disabled regardless of the settings for connection retry count ('RetryCount') and connection retry waiting time ('RetryInterval') of runtime properties.

(3) Deploying the DB Connector for member resource adapters

If you deploy the DB Connector for the member resource adapter, you can use it as a J2EE resource adapter. Note that you can define the properties after deploying the DB Connector. In such a case, however, define the properties when the root resource adapter to which the applicable DB Connector for the member resource adapter belongs and the DB Connector for the member resource adapter are not running. For the method of defining properties, see (2) Defining DB Connector properties for member resource adapter.

Execute the following command to deploy the DB Connector for the member resource adapter:

Execution format
 
cjdeployrar [server-name] [-nameserver provider-URL] -resname display-name-of-DB-Connector-for-the-member-resource-adapter

Example of execution
cjdeployrar MyServer -resname DB_Connector_for_Oracle_ClusterPool_Member
 

For details on the cjdeployrar command, see cjdeployrar (Deploying resource adapters) in the uCosminexus Application Server Command Reference Guide.

(4) Testing the connectivity of the DB Connector for a member resource adapter

Use the connectivity test to verify whether the information set in the DB Connector for the member resource adapter is correct.

Execute the following command to perform connectivity testing of the DB Connector for the member resource adapter:

Execution format
 
cjtestres [server-name] [-nameserver provider-URL] -type rar -resname Display-name-of-DB-Connector-for-the-member-resource-adapter
 

Example of execution
cjtestres -type rar -resname DB_Connector_for_Oracle_ClusterPool_Member
 

For details on the cjtestres command, see cjtestres (Connection test of resources) in the uCosminexus Application Server Command Reference Guide.

Note:
You cannot delete the DB Connector for the member resource adapter whose connection is once tested until you restart the J2EE server. To delete the DB Connector for the member resource adapter, stop the root resource adapter to which the applicable DB Connector for the member resource adapter belongs and the DB Connector for the member resource adapter, and then restart the J2EE server.