1 About WebLogic JDBC Resources

To configure JDBC resources you need to understand how to use the different types of data sources available such as Active GridLink (AGL) and Multi Data Source (MDS). Each data source that you configure contains a pool of database connections that are created when the data source instance is created—when it is deployed or targeted, or at server startup.

JDBC Resources

The key to understanding WebLogic JDBC data source configuration is to understand who creates a JDBC resource or how a JDBC resource is created and managed. This determines how a resource will be deployed and modified.

Both system administrators and programmers can create and manage JDBC resources either as system modules or as application modules. WebLogic supports either standard or proprietary JDBC application modules. Regardless of whether you are using JDBC system modules or JDBC application modules, each JDBC data source is represented by an XML file (a module).

  • System Modules: WebLogic Administrators typically use the WebLogic Server Administration Console or the WebLogic Scripting Tool (WLST) to create and deploy (target) JDBC modules. These JDBC modules are considered system modules. See JDBC System Modules.

  • Application Modules: Programmers create modules in a development tool that supports creating an XML descriptor file, then package the JDBC modules with an application (for example, an EAR or WAR file) and pass the application to a WebLogic Administrator to deploy. These JDBC modules are considered application modules. See JDBC Application Modules.

The standard JDBC application modules are created using the JEE 6 annotations or schema definitions based on datasourcedefinition. The proprietary JDBC application modules are a WebLogic-specific extension of Java EE modules and can be configured either within a Java EE application or as stand-alone modules.

These documents conform to the jdbc-data-source.xsd schema (available at http://www.oracle.com/webfolder/technetwork/weblogic/jdbc-data-source/index.html).

Table 1-1 lists the JDBC module types and how they can be configured and modified.

Table 1-1 JDBC Module Types and Configuration and Management Options

Module Type Created with Add/Remove Modules with Administration Console Modify with JMX (remotely) Modify with JSR-88 (non-remotely) Modify with Administration Console


WebLogic Server Administration Console or WLST




Yes—via JMX


Oracle Enterprise Pack for Eclipse (OEPE), Oracle JDeveloper, another IDE, or an XML editor



Yes—via a deployment plan

Yes—via a deployment plan

JDBC Data Sources

In WebLogic Server, you configure database connectivity by adding data sources to your WebLogic domain. WebLogic JDBC 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.

You can configure database connectivity by adding JDBC data sources to your WebLogic domain. Configuring data sources requires several steps including choosing a type of data source, creating the data source, configuring connection pools and Oracle database parameters and so on. See Configuring JDBC Data Sources.

Types of WebLogic Server JDBC Data Sources

WebLogic Server provides the following types of data sources:

  • Default data sources—Oracle provides a default data source required by a Java EE 7-compliant runtime. Applications can use this pre-configured data source to access the Derby database installed with the WebLogic Server. See Using the Default Data Source.

  • Generic data sourcesGeneric 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. See Using Generic Data Sources.

  • Active GridLink data sources—A data source that provides a connection pool that spans one or more nodes in one or more Oracle RAC clusters. It supports dynamic load balancing of connections across the nodes and handles events indicating nodes added and removed from the cluster(s). See Using Active GridLink Data Sources.

  • Multi Data Source —A MDS is an abstraction around a group of Generic data sources that provides load balancing or failover processing. See Configuring JDBC Multi Data Sources.

  • Proxy data source—A data source that provides the ability to switch between databases in a WebLogic Server Multitenant environment. See Using Proxy Data Sources.

  • Universal Connection Pool (UCP) data source—A UCP data source provides an option for users who wish to use Oracle Universal Connection Pooling to connect to Oracle Databases. UCP provides an alternative connection pooling technology to Oracle WebLogic Server connection pooling. See Using Universal Connection Pool Data Sources.

JMX and WLST Access for JDBC Resources

You can create JDBC resources using any of the WebLogic Server administration tools. When you create JDBC resources, WebLogic Server creates MBeans (Managed Beans) for each of the resources. You can then access these MBeans using Java Management Extensions (JMX) or the WebLogic Scripting Tool (WLST).

The WebLogic Scripting Tool is a complete, command-line scripting environment for managing Oracle WebLogic Server domains, based on the Java scripting interpreter, Jython. In addition to supporting standard Jython features such as local variables, conditional variables, and flow control statements, the WebLogic Scripting Tool provides a set of scripting functions (commands) that are specific to Oracle WebLogic Server. You can extend the WebLogic scripting language to suit your needs by following the Jython language syntax. See, Using the WebLogic Scripting Tool in Understanding the WebLogic Scripting Tool.

To integrate third-party management systems with the WebLogic Server management system, WebLogic Server provides standards-based interfaces that are fully compliant with the JMX specification. Software vendors can use these interfaces to monitor WebLogic Server MBeans, to change the configuration of a WebLogic Server domain, and to monitor the distribution (activation) of those changes to all server instances in the domain. See, Understanding WebLogic Server MBeans in Developing Custom Management Utilities Using JMX for Oracle WebLogic Server.

For a complete list of WebLogic Server administration tools, see Summary of System Administration Tools and APIs in Understanding Oracle WebLogic Server.

For detailed information, see JMX and WLST Access for JDBC Resources.

WebLogic Server with Oracle RAC

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

Advanced Configurations for Oracle Drivers and Databases

Oracle provides advanced configuration options such as JDBC Replay XA Driver, database resident connection policy, and global database services to improve data source and driver performance when using Oracle drivers and databases. These configuration options help in the management of connection reservations in the data source.

For more information, see Advanced Configurations for Oracle Drivers and Databases.