bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Administration Console Online Help

 Previous Next Contents Index  

JDBC

In the JDBC area of the Administration Console, you can configure and monitor JDBC components, including Connection Pools, MultiPools, and Data Sources. The following sections provide guidelines for configuring and managing database connectivity through the JDBC components for both local and distributed transactions:

 


Creating and Deploying JDBC Components—Connection Pools, MultiPools, and Data Sources

Using the Administration Console, you create the JDBC components—connection pools, Data Sources, and MultiPools—by specifying attributes and database properties and then deploy them to servers and clusters by selecting targets.

Figure 10-1 JDBC Components in WebLogic Server


 

First you create the connection pools (and optionally, MultiPools) and deploy them to servers and clusters, then you create the Data Sources which are bound to the JNDI tree, and deploy the Data Sources to the same servers and clusters. When you create a Data Source object, you specify a connection pool or MultiPool as one of the Data Source attributes. This associates that Data Source with one specific connection pool or MultiPool ("pool").

When you target Data Sources and pools, you should target the Data Source and its related pool to the same servers and clusters. Some common scenarios are as follows:

You can target Data Source/connection pool combinations to more than one server or cluster, but they must be targeted in combination. For example, you cannot target a Data Source to Managed Server A if its associated connection pool is assigned only to Managed Server B.

Related Information

JDBC Objects in a Cluster

WebLogic Server allows you to cluster JDBC objects, including data sources, connection pools and MultiPools, to improve the availability of cluster-hosted applications. Each JDBC object you configure for your cluster must exist on each managed server in the cluster—when you configure the JDBC objects, target them to the cluster.

For information about JDBC objects in a clustered environment, see "JDBC Connections" in Using WebLogic Server Clusters.

JDBC Configuration Guidelines

To set up JDBC connectivity, you configure connection pools, Data Source objects (always recommended, but optional in some cases), and MultiPools (optional) by defining attributes in the Administration Console or, for dynamic connection pools, in application code or at the command line.

There are three types of transaction scenarios:

You configure Data Source objects (DataSources and TxDataSources), connection pools, and MultiPools according to the way transactions are handled in your system. The following table summarizes how to configure these objects for use in the three transaction scenarios:

Table 10-1 Summary of JDBC Configuration Guidelines

Description/Object

Local Transactions

Distributed Transactions

XA Driver

Distributed Transactions

Non-XA Driver

JDBC driver

  • WebLogic jDriver for Oracle .

  • Compliant third-party drivers.

  • WebLogic jDriver for Oracle/XA.

  • XA-compliant third-party drivers.

  • WebLogic jDriver for Oracle

  • Compliant third-party drivers.

Data Source

Data Source object
recommended. (If there is no Data Source, use the JDBC API.)

Requires Tx Data Source (Data Source with Honor Global Transactions selected).

Requires Tx Data Source (Data Source with Honor Global Transactions selected).

Select Emulate Two-Phase Commit for non-XA Driver (set enable two-phase commit=true) See Configuring Non-XA JDBC Drivers for Distributed Transactions and Emulating Two-Phase Commit

Connection Pool

Requires Data Source object when configuring in the Administration Console.

Requires Tx Data Source (Data Source with Honor Global Transactions selected).

Requires Tx Data Source (Data Source with Honor Global Transactions selected).

MultiPool

Connection Pool and Data Source required.

Not Supported

Not Supported

Note: For distributed transactions, use an XA-compliant driver, such as the WebLogic jDriver for Oracle/XA, which is the XA compliant version of the WebLogic jDriver for Oracle.

 


Overview of JDBC Administration

The Administration Console provides an interface to the tools that allow you to configure and manage WebLogic Server features, including JDBC (Java database connectivity). For most JDBC administrative functions, which include creating, managing and monitoring connectivity, systems administrators use the Administration Console or the command-line interface. Application developers may want to use the JDBC API or the WebLogic Management API.

Frequently performed tasks to set and manage connectivity include:

About the Administration Console

Your primary way to set and manage JDBC connectivity is through the Administration Console. Using the Administration Console, you set up persistent connectivity—connection pools, Data Sources, and Multipools that are available even after you stop and restart the server. These JDBC objects are known as static objects. You can create dynamic objects—objects that you expect to use and then remove—with the administration command line or in application code.

In addition to setting connectivity, the Administration Console allows you to manage and monitor established connectivity.

Related Information

The JDBC drivers, used locally and in distributed transactions, interface with many WebLogic Server components and information appears in several documents. For example, information about JDBC drivers is included in the documentation sets for JDBC, JTA, and WebLogic jDrivers.

The following sections list Related Topics resources for JDBC, JTA, and Administration:

Administration and Management

JDBC and WebLogic jDrivers

The following documentation is written primarily for application developers. Systems Administrators may want to read the introductory material as a supplement to the material in this document.

Transactions (JTA)

The following documentation is written primarily for application developers. Systems Administrators may want to read the following as supplements to the material in this section.

 

Back to Top Previous Next