20.1.5 Procedure for stopping or starting a connection pool manually
This section describes the procedure for connection pool clustering. By manually stopping and restarting some of the connection pools when you handle the errors occurring in a database and when you perform database maintenance, you can perform database maintenance without stopping the entire system. To perform database maintenance by manually stopping and restarting some of the connection pools:
-
Check the connection pool status (see (1))
Use the server management commands to execute the operation.
-
Suspend the connection pool (see (2))
Use the server management commands to execute the operation.
-
Restart the connection pool (see (3))
Use the server management commands to execute the operation.
-
Check the connection pool status (see (1))
Use the server management commands to execute the operation.
- Organization of this subsection
(1) Checking the connection pool state
You check the connection pool state before and after you perform maintenance for a database in a cluster configuration.
For details on the connection pool states, see 20.1.4(3) States of the connection pool.
You check the connection pool state with the cjlistrar command.
The format and example of execution of the cjlistrar command are as follows:
- Format of execution
cjlistrar server-name -clusterpool
- Example of execution
cjlistrar MyServer -clusterpool
(2) Suspending the connection pool
This section describes the procedure for suspending the connection pool.
You can suspend a connection pool with the cjsuspendpool command. When you execute the cjsuspendpool command, the connection pool is blocked and suspended and the connection requests are no longer received.
You can execute the cjsuspendpool command when the status of the connection pool is as follows:
-
Start
-
Reserved Start
-
Auto-suspension
-
Reserved Auto-suspension
For details on how to check the state of the connection pool, see (1) Checking the connection pool state.
The format and example of execution of the cjsuspendpool command are as follows:
- Format of execution
cjsuspendpool server-name -resname display-name-of-member-resource-adapter-to-be-suspended
- Example of execution
cjsuspendpool MyServer -resname DB_Connector_for_Oracle_ClusterPool_Member
(3) Restarting the connection pool
This section describes the procedure for restarting the connection pool.
You can restart the connection pool with the cjresumepool command. When you execute the cjresumepool command, the connection pool status changes to Manual Restarting and the restart processing is executed. When the restart processing finishes, the connection pool status changes to Start and the connection requests are received.
You can execute the cjresumepool command when the state of the connection pool is as follows:
-
The number of unused connection management threads is equal to the maximum number of connections in the connection pool or more
-
The status of the connection pool is Manual Suspension, Reserved Manual Suspension, Auto-suspension, or Reserved Auto-suspension
For details on how to check the state of the connection pool, see (1) Checking the connection pool state.
The format and example of execution of the cjresumepool command are as follows:
- Format of execution
cjresumepool server-name -resname display-name-of-member-resource-adapter-to-be-restarted
- Example of execution
cjresumepool MyServer -resname DB_Connector_for_Oracle_ClusterPool_Member
Note that after you execute the cjresumepool command, you must check the status of the connection pool to check whether the restart processing was executed correctly. For details on how to check the state of the connection pool, see (1) Checking the connection pool state.