Oracle RAC (active-active or multi-node) configuration

Scenario

Multiple nodes share the same storage. Connections must be spread across nodes, and if one fails, the client must instantly move to another node.

Best practice

Use the Single Client Access Name (SCAN) address. The following example shows the XML configuration:

<dataSource id="twsdb" jndiName="jdbc/twsdb">
            <connectionManager 
            minPoolSize="10" 
            maxPoolSize="100" 
            preTestConnection="true" 
            validationTimeout="5s" 
            agedTimeout="30m"/>
            <properties.oracle 
            URL="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
            (HOST=my-scan-address.example.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=myHwaService)(FAILOVER_MODE=
            (TYPE=SELECT)(METHOD=BASIC)(RETRIES=20)(DELAY=5))))" 
            user="YOUR_USER" 
            password="your_password"/>
            </dataSource>
Note: The preTestConnection="true" property ensures that HCL Workload Automation checks if the connection to the RAC node is still active before sending a job command.