Hitachi

uCosminexus Application Server Compatibility Guide


20.3.1 Overview of a cluster connection pool

A connection pool that is clustered is called a cluster connection pool. A cluster connection pool consists of a root resource adapter and a member resource adapter. The connection pool of a member resource adapter is called the member connection pool.

The following sections describe how to control the operations and state for using the cluster connection pool of DB Connector:

Organization of this subsection

(1) Setting a cluster connection pool

To use a cluster connection pool, you need to setup a resource adapter that can use the cluster connection pool.

Set up the DB Connector for the cluster connection pool with the following procedure:

Note that you repeat steps 1 and 2 for the required number of member resource adapters.

  1. Setup a DB Connector for the member resource adapter.

    Use the following procedures to setup a DB Connector for member resource adapters:

    • Import the RAR file of the DB Connector for the member resource adapter.

    • Define properties.

    • Deploy the DB Connector.

    • Check the connectivity.

      Use the connectivity test to verify if the connection is correct.

  2. Start the DB Connector for the member resource adapter.

  3. Set up the DB Connector for the root resource adapter.

    Use the following procedures to set up the DB Connector for the root resource adapter:

    • Import the RAR file of DB Connector for the root resource adapter.

    • Define properties.

    • Deploy DB Connector.

    • Check the connectivity.

      Use the connectivity test to verify if the connection is correct.

  4. Start the DB Connector for the root resource adapter.

The root resource adapter is directly accessed from a J2EE application, so for the deployed root resource adapter, you need to resolve the references by using the J2EE application property settings. For details, see 9.3.3 Defining resource adapter references in the manual uCosminexus Application Server Application Setup Guide.

Reference note

To set up new DB Connector properties, you can use the template files provided in Cosminexus Component Container.

The template files of the HITACHI Connector Property file are saved in the following directory:

  • In Windows:

    Cosminexus-installation-directory\CC\admin\templates\

  • In UNIX:

    /opt/Cosminexus/CC/admin/templates/

You can use this template file to edit the HITACHI Connector property file before importing the DB Connector. Copy and use the template file.

For details on the template file names of the HITACHI Connector Property file, see 4.1.13 Template files of the HITACHI Connector Property File in the uCosminexus Application Server Application and Resource Definition Reference Guide.

You do not use the template file to change the properties of DB Connector for which properties are already specified. You obtain the Connector properties of an imported DB Connector, and then edit the HITACHI Connector Property file.

(2) State of cluster connection pool and operations that can be executed

You can suspend a member connection pool manually when there is a database failure or for maintenance. If the member connection pool is suspended, the processing is not performed in the case of a connection acquisition request to the root resource adapter.

You can manually restart the suspended member connection pool. In the case of a connection acquisition request to the root resource adapter, only the process for a running connection pool is performed.

For details on controlling the connection pool state, see 20.1.4 Connection pool clustering operations.

(3) Functional differences based on the types of resource adapters

The following table lists the resource adapter types and the functions that can be used:

Table 20‒7: List of functions based on the resource adapter types

Functions

Types of resource adapters

Root resource adapter

Member resource adapter

Connection pooling

N

D

Warming up of connection pool

N

Y

Connection sharing and association

N

Y

Statement pooling

N

Y

Cache of DataSource object

Y

N

Optimization of sign-on in the container management of DB Connector

N

Y

Connection failure detection

N

D

Timeout in connection failure detection

N

D

Connection acquisition request when connections are used up

N

D

Retry in acquiring connection

N

N

Display of connection pool information

N

Y

Clear connection pool

N

Y

Connection auto close

N

Y

Connection sweeper

N

Y

Test the connectivity

Y

Y

Connection pool count adjustment function

N

Y

Display of connection pool information

N

Y

Suspend connection pool#

N

Y

Restart connection pool#

N

Y

User-specified name space function of J2EE resources

Y

N

Legend:

D: Definitely enabled

Y: Can be used

N: Cannot be used

#

If you do not use a clustered connection pool, you cannot suspend and restart the connection pool.

The following table lists the resource adapter types that set the DB Connector attributes:

Table 20‒8: Types of resource adapters and attribute settings

Settings

Types of resource adapters

Root resource adapter

Member resource adapter

Transaction support level

N

Y

Feasibility of acquiring log

Y

Y

Database connection information

--

Y

DB Connector specific settings (such as statement pool)

--

Y

Security information (user name and password)

N

Y

Connection pool size

N

Y

Cluster connection pool specific settings

Y

--

Legend:

Y: Settings are required

N: Settings are not required

--: No settings