C Using Connect-Time Failover with Oracle RAC (Deprecated)

This chapter provides information on how WebLogic Server provides Connect-Time Failover (deprecated) for legacy applications that use data sources configured to use connect-time failover and load balancing.


New applications should a GridLink Data Source, which provides the same capabilities. See What is a GridLink Data Source and "Implicit Connection Caching" in the Database JDBC Developer's Guide.

Using Connect-Time Failover without Global Transactions

To connect WebLogic Server to multiple Oracle RAC nodes using data sources configured for connect-time failover and load balancing, configure a JDBC data source for each Oracle RAC instance in your Oracle RAC cluster with the Oracle Thin driver, as described in the sections that follow. Figure C-1 shows an overview of the system.

Figure C-1 Data Source Configuration with Oracle Thin Driver Connect-Time Failover

Description of Figure C-1 follows
Description of "Figure C-1 Data Source Configuration with Oracle Thin Driver Connect-Time Failover"

You can use the Administration Console or any other means that you prefer to configure your domain, such as the WebLogic Scripting Tool (WLST) or a JMX program.

When connections are created in the data source, the Oracle Thin driver determines which Oracle RAC instance to use. When an application gets a connection, it looks up a data source on the JNDI tree and requests a connection from the data source. The data source delivers one of the available connections from the pool of connections in the data source.

The following sections describe a configuration which uses Oracle RAC's connect-time failover features to handle connection failures. With this configuration, in some failure cases, the failover time is as long as the TCP timeout, which can be several minutes, depending on your environment.

Attributes of a Connect-Time Failover Configuration without Global Transactions

To use this configuration, create JDBC data sources in your WebLogic domain with the following attributes.

  • Oracle JDBC Thin driver 11g configured for connect-time failover. For example:

  • ConnectionReserveTimeoutSeconds="120"

    • Enables application requests for a connection to wait 120 seconds for a connection to become available.

  • TestConnectionsOnReserve="true"

    • Enables testing of a database connection when an application reserves a connection from the data source. See Test Connections on Reserve to Enable Fail-Over for more details about this attribute.

    • Required to enable failover to another Oracle RAC node.

  • TestTableName="name_of_small_table" The name of the table used to test a physical database connection. For more details about this attribute, see Connection Testing Options for a Data Source.

Sample Configuration Code

Sample configuration code is shown below.


Line breaks added for readability.
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source"
    <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>