3.15.3 Retrying to obtain a connection

Connection retry is a functionality that automatically retries to obtain a connection when there are no available connections in the connection pool and when the establishment of a physical connection fails. By using the connection retry functionality, if an attempt to obtain a connection fails, you need not use the user program to retry to obtain a connection.

You can retry to obtain a connection when one of the following conditions is satisfied:

Note that if a connection cannot be obtained even after retrying, an exception is reported to the application program and the process of obtaining a connection fails.

For the operations to be performed when the connection pool depletes, follow the description in 3.15.2 Waiting for a connection when connections deplete.

To implement the connection retry functionality, you must set up the following content as the resource adapter properties:

Note that if the retry count and retry interval is increased, the requests might have to wait when the processing to obtain connections accumulate.

For details on the resource adapter settings, see 3.15.13 Settings in the execution environment.

Organization of this subsection
(1) Preconditions

(1) Preconditions

The following table describes the preconditions for using the connection retry functionality.

Table 3-58 Using the connection retry functionality

ResourceConnection methodUsability
DatabaseDB ConnectorY
Database queueDB Connector for Cosminexus RM and Cosminexus RMY
OpenTP1uCosminexus TP1 ConnectorY
TP1/Message Queue - AccessY
SMTP serverMail configurationN
JavaBeans resource--N
Other resourcesResource adapters conforming to the Connector 1.0 specifications or Connector 1.5 specificationsY
Legend:
Y: Available
N: Not available
--: Not applicable