1 Introduction and Roadmap

This section describes the contents and organization of this guide—Oracle Fusion Middleware Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.

Document Scope and Audience

This document is a resource for software developers and system administrators who develop and support applications that use the Java Database Connectivity (JDBC) API. It also contains information that is useful for business analysts and system architects who are evaluating WebLogic Server. The topics in this document are relevant during the evaluation, design, development, pre-production, and production phases of a software project.

This document does not address specific JDBC programming topics. For links to WebLogic Server documentation and resources for this topic, see Related Documentation.

It is assumed that the reader is familiar with Java EE and JDBC concepts. This document emphasizes the value-added features provided by WebLogic Server.

Guide to this Document

Related Documentation

This document contains JDBC data source configuration and administration information.

For comprehensive guidelines for developing, deploying, and monitoring WebLogic Server applications, see the following documents:

JDBC Samples and Tutorials

In addition to this document, Oracle provides a variety of JDBC code samples and tutorials that show configuration and API use, and provide practical instructions on how to perform key JDBC development tasks.

Avitek Medical Records Application (MedRec) and Tutorials

MedRec is an end-to-end sample Java EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application provides a framework for patients, doctors, and administrators to manage patient data using a variety of different clients.

MedRec demonstrates WebLogic Server and Java EE features, and highlights Oracle-recommended best practices. MedRec is included in the WebLogic Server distribution, and can be accessed from the Start menu on Windows machines. For Linux and other platforms, you can start MedRec from the WL_HOME\samples\domains\medrec directory, where WL_HOME is the top-level installation directory for WebLogic Platform.

JDBC Examples in the WebLogic Server Distribution

WebLogic Server optionally installs API code examples in WL_HOME\samples\server\examples\src\examples, where WL_HOME is the top-level directory of your WebLogic Server installation. You can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server Start menu.

New and Changed JDBC Data Source Features in This Release

This release includes the following new and changed features:

For a comprehensive listing of the new WebLogic Server features introduced in this release, see What's New in Oracle WebLogic Server.

CapacityIncrement Attribute

In WebLogic Server 10.3.1 and higher releases, the capacityIncrement attribute is no longer configurable and is set to a value of 1.

MinCapacity Attribute

The MinCapacity attribute sets the minimum number of physical connections that a connection pool can contain after it is initialized.

The InitialCapacity value that previously handled both the initial and minimum capacity for the pool this has been split into two attributes:

  • MinCapacity defaults to InitialCapacity if not set; InitialCapacity continues to default to 1.

  • MinCapacity is only used for shrinking calculations only. It is lazy in that the minimum connections are not created when the server starts up; InitialCapacity is used for this function.

  • For upward compatibility, InitialCapacity is used if MinCapacity is not set.

  • After a data source goes through a suspend/resume, the greater of MinCapacity or InitialCapacity is used.

  • Example: You set InitialCapacity to 0 to start up database and then set InitialCapacity to 50 to keep at least 50 connections in the pool at all times. With the rules above, MinCapacity is initially be treated as 0 and then trated as 50 so there will be at least 50 connections in the pool at all times.

See Shrinking a Connection Pool.

Define Fatal Error Codes

For each data source, you can define fatal error codes that indicate that the back-end database with which the data source communicates is no longeraccessible on a connection. See Define Fatal Error Codes.

Data Source Profile Logging

Prior to WebLogic Server 10.3.6, data source profile records were recorded as WLDF events. To provide better usability and performance, WebLogic Server now uses a data source profile log to store events. See Monitoring WebLogic JDBC Resources.

Application-scoped Drivers

You can include a database driver in the EAR/WAR file that contains an application-scoped data source. This allows you to deploy a self-contained EAR file that has both the data source and driver required for an application. See Including Drivers in EAR/WAR Files.

Oracle BI Server Support

WebLogic Server and higher supports the Oracle BI Server. Select Oracle BI Server as the database type when creating a new generic data source to interoperate with the Oracle BI Server. See Creating a JDBC Data Source.

Keep Connection After Global Transaction

This release provides a new attribute, Keep Connection After Global Transaction, that enables WebLogic Server to keep a physical database connection associated with a logical connection when committing or rolling back a global transaction. See KeepConnAfterGlobalTx in the Oracle WebLogic Server MBean Reference.

Session Affinity Policy

WebLogic Server GridLink data sources use the session affinity policy to improve performance by directing the database operations of a servlet session to the same RAC instance in a RAC cluster. See GridLink Affinity.

Secure RMI Driver Communication

Secure RMI driver client communication with DataSource objects at the server level by setting the RMI JDBC Security parameter, see "Security Considerations for WebLogic RMI Drivers" in Programming JDBC for Oracle WebLogic Server.

Proxy Authentication

You can configure a WebLogic data source to allow a client to connect to an Oracle database through an application server as a proxy user. See Proxy Authentication for Oracle Databases.

Set Database Credentials on a Connection

You can configure a WebLogic data source to allow a connection to set database credentials when connecting to an Oracle database. See Setting Database Credentials on a Connection.

Connection Harvesting

You can specify a number of reserved connections to be released when a data source reaches a specified number of available connections. Harvesting helps to ensure that a specified number of connections are always available in the pool and improves performance by minimizing connection initialization. See Configuring Connection Harvesting.

Connection Labeling

Labeling allows an application to attach arbitrary name/value pairs (labels) to a connection that has a particular initialization state. This allows the application to improve performance by minimizing the time and cost of re-initializing a connection. See Labeling Connections.

New Debug Scopes

This release provides the following new debug scopes:

  • weblogic.jdbc.rac.DebugJDBCONS - low-level ONS debugging

  • weblogic.jdbc.rac.DebugJDBCRAC - RAC debugging

  • weblogic.jdbc.rac.DebugJDBCUCP - low-level UCP debugging

  • weblogic.jdbc.rac.DebugJDBCREPLAY - REPLAY debugging

  • weblogic.jdbc.transaction.DebugJTAJDBC - transaction debugging

See JDBC Debugging Scopes.

ONS Debugging

For WebLogic Server releases and higher, the package names for UCP and ONS are no longer repackaged. This affects debugging for these components, see Setting Debugging for UCP/ONS.