The method of connecting to Oracle using Oracle RAC differs depending on the Oracle version or the functionality used for load balancing. Note that the connectable transaction type is a local transaction.
For details on the Oracle versions, the functionality used for load balancing, and the mapping of the RAR files used, see 3.6.6 Preconditions and notes on connecting to Oracle.
This subsection describes the Oracle connection method for each functionality used for load balancing.
You use the connection pool clustering functionality of Application Server to connect to Oracle RAC. Application Server distributes the load of database access.
For details on the connection pool clustering functionality, see the description in section 3.17.2 and later.
The following figure shows the load balancing procedure and settings when you use the connection pool clustering functionality.
Figure 3-61 Connection using the connection pool clustering functionality
This figure shows an Oracle RAC system with a 3-node configuration where the database node 1 contains instance 1, database node 2 contains instance 2, and database node 3 contains instance 3. The settings for connecting to the database are as follows:
With these settings, the database access from the J2EE applications 1 and 2 is distributed to the database nodes 1, 2, and 3.
When a database error occurs, Application Server detects the error. The member resource adapter mapped to the database where the error occurred is blocked and the processing is continued with the remaining instances.
When the database error is recovered, Application Server automatically releases the blockade. You can also release the blockade manually.
You connect to Oracle RAC from DB Connector and distribute the database access load with the Oracle RAC functionality.
The following figure shows the load balancing procedure and settings when you use the Oracle RAC functionality.
Figure 3-62 Connection using the Oracle RAC functionality
This figure shows an Oracle RAC system with a 3-node configuration where the database node 1 contains instance 1, database node 2 contains instance 2, and database node 3 contains instance 3. The settings for connecting to the database are as follows:
With these settings, the database access from the J2EE applications 1 and 2 is distributed to the database nodes 1, 2, and 3.
When a database error occurs, the Oracle RAC functionality separates the instance where the error occurred and the processing is continued with the remaining instances.
If you are using an Application Server connection pool, execute one of the following operations during database recovery. The connection pool is cleared and the subsequent access is distributed normally.