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.
This chapter, Chapter 1, "Introduction and Roadmap," introduces the organization of this guide and lists new features in the current release.
Chapter 2, "Configuring WebLogic JDBC Resources," provides an overview of WebLogic JDBC resources.
Chapter 3, "Configuring JDBC Data Sources," describes WebLogic JDBC data source configuration.
Chapter 4, "Using GridLink Data Sources," describes WebLogic JDBC GridLink data source configuration.
Chapter 5, "Configuring JDBC Multi Data Sources," describes WebLogic JDBC multi data source configuration.
Chapter 6, "Advanced Configurations for Oracle Drivers and Databases," provides advanced configuration options that can provide improved data source and driver performance when using Oracle drivers and databases.
Chapter 7, "JDBC Data Source Transaction Options," provides information on XA, non-XA, and Global Transaction options for WebLogic data sources.
Chapter 8, "Using Roles and Policies to Secure JDBC Data Sources," provides information on how WebLogic Server uses roles and policies to secure JDBC data sources.
Chapter 9, "Deploying Data Sources on Servers and Clusters," provides information on how to deploy data sources on servers and clusters.
Chapter 10, "Tuning Data Source Connection Pools," provides information on how to properly tune the connection pool attributes in JDBC data sources in your WebLogic Server domain to improve application and system performance.
Chapter 11, "Using WebLogic Server with Oracle RAC," describes how to configure WebLogic Server for use with Oracle Real Application Clusters.
Chapter 12, "Using JDBC Drivers with WebLogic Server," describes how to use JDBC drivers from other sources in your WebLogic JDBC data source configuration.
Chapter 13, "Monitoring WebLogic JDBC Resources," describes how to monitor JDBC resources, gather profile information about database connection usage, and enable JDBC debugging.
Chapter 14, "Managing WebLogic JDBC Resources," describes how to administer data sources.
Appendix A, "Configuring JDBC Application Modules for Deployment," describes how to package a WebLogic JDBC module with your enterprise application.
Appendix B, "WebLogic Server 12.1.1 Support for Oracle 12c Database," provides information on how to configure WebLogic Server Release 12.1.1 to run with an Oracle 12c database.
Appendix C, "Using Multi Data Sources with Oracle RAC," describes how to configure generic data sources for use with Oracle Real Application Clusters.
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:
Programming JDBC for Oracle WebLogic Server is a guide to JDBC API programming with WebLogic Server.
Developing Applications for Oracle WebLogic Server is a guide to developing WebLogic Server applications.
Deploying Applications to Oracle WebLogic Server is the primary source of information about deploying WebLogic Server applications in development and production environments.
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.
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
\samples\domains\medrec directory, where
WL_HOME is the top-level installation directory for WebLogic Platform.
WebLogic Server optionally installs API code examples in
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.
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.
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 sets the minimum number of physical connections that a connection pool can contain after it is initialized.
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
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 treated as 50 so there will be at least 50 connections in the pool at all times.
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.
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.
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.
WebLogic Server 10.3.6.0 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.
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.
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 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.
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.
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.
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.
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.
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
For WebLogic Server releases 10.3.6.0 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.