16 Using WebLogic Server with Oracle RAC

This chapter describes the requirements and configuration tasks for using Oracle Real Application Clusters (Oracle RAC) with WebLogic Server.

Oracle WebLogic Server provides strong support for Oracle RAC, minimizing database access time while allowing transparent access to rich pooling management functions that maximizes both connection performance and availability.

This chapter includes the following sections:

Both Oracle RAC and WebLogic Server are complex systems. To use them together requires specific configuration on both systems, as well as clustering software and a shared storage solution. This document describes the configuration required at a high level. For more details about configuring Oracle RAC, your clustering software, your operating system, and your storage solution, see the documentation from the respective vendors.

Overview of Oracle Real Application Clusters

Oracle Real Application Clusters (Oracle RAC) is a software component you can add to a high-availability solution that enables users on multiple machines to access a single database with increased performance. Oracle RAC comprises two or more Oracle database instances running on two or more clustered machines and accessing a shared storage device via cluster technology. To support this architecture, the machines that hosts the database instances are linked by a high-speed interconnect to form the cluster. The interconnect is a physical network used as a means of communication between the nodes of the cluster. Cluster functionality is provided by the operating system or compatible third party clustering software.

An Oracle RAC installation appears like a single standard Oracle database and is maintained using the same tools and practices. All the nodes in the cluster execute transactions against the same database and Oracle RAC coordinates each node's access to the shared data to maintain consistency and ensure integrity. You can add nodes to the cluster easily and there is no need to partition data when you add them. This means that you can horizontally scale the database tier as usage and demand grows by adding Oracle RAC nodes, storage, or both.

Software Requirements

To use WebLogic Server with Oracle RAC, you must install the following software on each Oracle RAC node:

  • Operating system patches required to support Oracle RAC. See the release notes from Oracle for details.

  • Oracle database management system. See Oracle® Fusion Middleware Licensing Information.

  • Clustering software for your operating system. See the Oracle documentation for supported clustering software and cluster configurations.

  • Shared storage software, such as Oracle Automatic Storage Management (ASM). Note that some clustering software includes a file storage solution, in which case additional shared storage software is not required.

    Note:

    See "Supported Configurations" in What's New in Oracle WebLogic Server 12.2.1 for the latest WebLogic Server hardware platform and operating system support, and for the Oracle RAC versions supported by WebLogic Server versions and service packs. See the Oracle documentation for hardware and software requirements required for running the Oracle RAC software.

JDBC Driver Requirements

To use WebLogic Server with Oracle RAC, your WebLogic JDBC data sources must use the Oracle JDBC Thin driver 11g or later to create database connections.

Hardware Requirements

A typical WebLogic Server/Oracle RAC system includes a WebLogic Server cluster, an Oracle RAC cluster, and hardware for shared storage.

WebLogic Server Cluster

The WebLogic Server cluster can be configured in many ways and with various hardware options. See Administering Clusters for Oracle WebLogic Server for more details about configuring a WebLogic Server cluster.

Oracle RAC Cluster

For the latest hardware requirements for Oracle RAC, see the Oracle RAC documentation. However, to use Oracle RAC with WebLogic Server, you must run Oracle RAC instances on robust, production-quality hardware. The Oracle RAC configuration must deliver database processing performance appropriate for reasonably-anticipated application load requirements. Unusual database response delays can lead to unexpected behavior during database failover scenarios.

Shared Storage

In an Oracle RAC configuration, all data files, control files, and parameter files are shared for use by all Oracle RAC instances. An HA storage solution that uses one of the following architectures is recommended:

  • Direct Attached Storage (DAS), such as a dual ported disk array or a Storage Area Network (SAN)

  • Network Attached Storage (NAS)

For a complete list of supported storage solutions, see your Oracle documentation.

Configuration Options in WebLogic Server with Oracle RAC

When using WebLogic Server with Oracle RAC, you must configure your WebLogic Domain so that it can interact with Oracle RAC instances and so that it performs as expected. The following sections describe configuration options and requirements:

Choosing a WebLogic Server Configuration for Use with Oracle RAC

Consider the following alternatives:

  • To connect to multiple Oracle RAC instances when using global transactions (XA), Oracle recommends the use of transaction-aware WebLogic JDBC Multi Data Sources, which support failover and load balancing, to connect to the Oracle RAC nodes. For more information see Using Multi Data Sources with Global Transactions.

  • To connect to multiple Oracle RAC instances when not using XA, Oracle recommends the use of (non-transaction-aware) Multi Data Sources to connect to the Oracle RAC nodes. Use the standard Multi Data Source configuration, which supports failover and load balancing. For more information see Using Multi Data Sources without Global Transactions.

  • WebLogic supports the use of Oracle Data Guard with Multi Data Source and AGL.

  • When using Multi Data Source with single instances on the primary and standby, the algorithm type must be set to FAILOVER. When the instance on the primary fails, connections on the primary will fail and connections will be created on the standby.

The following table may help you as you try to determine which configuration is right for your particular application:

Table 16-1 Choosing Configurations to Use with Oracle RAC

Requires Load Balancing? Requires Failover? Requires Global Transactions (XA)? Uses Oracle RAC Services See...

Yes

Yes

Yes

Yes

Using Active GridLink Data Sources

Yes

Yes

Yes

No

Using Multi Data Sources with Global Transactions

Yes

Yes

Yes

Yes

Configuring Connections to Services on Oracle RAC Nodes

Yes

Yes

No

Yes

Configuring Connections to Services on Oracle RAC Nodes

Yes

Yes

No

No

Using Multi Data Sources without Global Transactions


When using Multi Data Source with Oracle RAC clusters on the primary and standby, a data source must be created for each instance. If you must use SCAN because that is the only networking configured, you must also specify the INSTANCE_NAME for each instance so that each data source maps to only one instance. The algorithm type must be set to Load BALANCE. Initially, the service will only be available on the instances of the primary cluster. So the load balancing algorithm will try to get equal connections from all primary instances and all secondary instances. Connections to the standby instances will fail and those data sources will be suspended. The Multi Data Source Test Frequency interval should be lowered from the default of 120 to approximately 5 seconds, so that the availability is tested often. When the primary goes down, the service is stopped at the primary and moved to the backup. The Multi Data Source will get connection failures on the primary instances and suspend them. The Multi Data Source will get connections on the backup instances and resume work on those data sources.

Validating Connections when using WebLogic Server with Oracle RAC

Applications can use the JDBC 4.0 Connection.isValid API to verify connection viability.

Additional Considerations When Using WebLogic Server with Oracle RAC

The Distributed Transaction Processing (DTP) attribute on a database service should not be used to coordinate transactions when using AGL data sources or Multi Data Sources with Oracle RAC. This option implies that the service is guaranteed to run on only one Oracle RAC instance at any time. Transaction affinity to a single instance is automatically managed by WebLogic Server for either AGL or Multi Data Source. This allows the whole Oracle RAC cluster to be available for distributed transactions, as opposed to DTP limiting all transactions for the service to a single Oracle RAC instance.