8 WebLogic Server Data Sources

This chapter describes WebLogic Java Database Connectivity (JDBC) data sources.

This chapter includes the following sections:

Understanding JDBC Data Sources

In WebLogic Server, you can configure database connectivity by configuring JDBC data sources and multi data sources and then targeting or deploying the JDBC resources to servers or clusters in your WebLogic domain.

Oracle WebLogic Server provides three types of data sources:

  • Generic Data Sources—Generic data sources and their connection pools provide connection management processes that help keep your system running efficiently.You can set options in the data source to suit your applications and your environment.

  • GridLink Data Sources—An event-based data source that adaptively responds to state changes in an Oracle RAC instance.

  • Multi data sources—An abstraction around a group of generic data sources that provides load balancing or failover processing.

WebLogic Server also supports Java EE DataSources, which can be programmatically defined for a more flexible and portable method of database connectivity. For more information on Java EE DataSources, see "Using DataSource Resource Definitions" in Developing JDBC Applications for Oracle WebLogic Server.

Understanding Generic Data Sources

Generic data sources provide database access and database connection management. Each data source contains a pool of database connections that are created when the data source is created and at server startup. Applications reserve a database connection from the data source by looking up the data source on the JNDI tree or in the local application context and then calling getConnection(). When finished with the connection, the application should call connection.close() as early as possible, which returns the database connection to the pool for other applications to use.

Understanding GridLink Data Sources

A single GridLink data source provides connectivity between WebLogic Server and an Oracle Database service, which may include multiple Oracle RAC clusters. It uses the Oracle Notification Service (ONS) to adaptively respond to state changes in an Oracle RAC instance. An Oracle Database service represents a workload with common attributes that enables administrators to manage the workload as a single entity. You scale the number of GridLink data sources as the number of services increases in the data base, independent of the number of nodes in the cluster.

A GridLink data source includes the features of generic data sources plus the following support for Oracle RAC:

Understanding JDBC Multi Data Sources

A multi data source is an abstraction around a group of data sources that is bound to the JDNDI tree or local application context just like data sources are bound to the JNDI tree. Applications look up a multi data source on the JNDI tree or in the local application context (java:comp/env) just as they do for data sources, and then request a database connection. The multi data source determines which data source to use to satisfy the request depending on the algorithm selected in the multi data source configuration: load balancing or failover.

Understanding Proxy Data Sources

Proxy data sources provide the ability to switch between databases in a WebLogic Server Multitenant environment. It simplifies the administration of multiple data sources by providing a light-weight mechanism for accessing a data source associated with a partition or tenant. Applications often need to quickly access a data source by name without needing to know the naming conventions, context names (partitions or tenants), and so on. The Proxy data source provides the access to the underlying data sources. All of the significant processing happens in the data sources to which it points. That is, the underlying data sources actually handle deployment, management, security, and so on. For more information on Proxy data sources, see "Using Proxy Data Sources" in Administering JDBC Data Sources for Oracle WebLogic Server.

Understanding Universal Connection Pool Data Sources

A Universal Connection Pool (UCP) data source is provided as an option for users who wish to use Oracle Universal Connection Pooling (UCP) to connect to Oracle Databases. UCP provides an alternative connection pooling technology to Oracle WebLogic Server connection pooling.


Oracle generally recommends the use of Active GridLink data source, Multi Data Source, or Generic data source, and Oracle WebLogic Server connection pooling included in these data source implementations to establish connectivity with Oracle Databases

The implementations of UCP data sources are loosely coupled, allowing the swapping of the ucp.jar to support the use of new UCP features by the applications. UCP data sources are not supported in an application-scoped/packaged or stand-alone module environment. For information see in ”Using Universal Connection Pool Data Sources” in Administering JDBC Data Sources for Oracle WebLogic Server.

Roadmap for WebLogic Server Data Sources