In WebLogic Server, you can configure database connectivity by configuring Java Database Connectivity (JDBC) data sources and then targeting or deploying those resources to servers or clusters in your WebLogic domain.
This chapter includes the following topics:
A data source is a pool of database connections that are created when the data source instance is created, which can occur when the data source is deployed, when it is targeted, or when the host WebLogic Server instance is started.
Oracle WebLogic Server provides five 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.
Active 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.
Proxy data sources—Data sources that provide the ability to switch between databases in a WebLogic Server Multitenant environment.
Universal Connection Pool (UCP) data sources—Data sources 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.
WebLogic Server also supports Java EE DataSource
objects, which can be programmatically defined for a more flexible and portable method of database connectivity. For more information on Java EE DataSource
objects, see Using DataSource Resource Definitions in Developing JDBC Applications for Oracle WebLogic Server.
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.An AGL data source includes the features of generic data sources plus the following support for Oracle RAC:
java:comp/env
), just as they do for data sources, and then request a database connection. The multi data source determines the data source to use that can satisfy the request depending upon the algorithm selected in the multi data source configuration: load balancing or failover.Note:
Oracle generally recommends the use of Active GridLink data sources, multi data sources, or generic data sources, and also the Oracle WebLogic Server connection pooling included in these data source implementations to establish connectivity with Oracle Database.
The implementations of UCP data sources are loosely coupled, allowing the swapping of the ucp.jar
file to support the use of new UCP features by the applications. UCP data sources are not supported in an application-scoped, application-packaged, or standalone module environment. See Using Universal Connection Pool Data Sources in Administering JDBC Data Sources for Oracle WebLogic Server.
The WebLogic Server documentation set includes several introductory, procedural, and reference topics, including examples, that help you understand how to configure and use WebLogic Server data sources.
Table 8-1 Roadmap for WebLogic Server Data Sources
Major Task | Subtasks and Additional Information |
---|---|
Learning more about WebLogic Server data source |
|
Configuring JDBC |
|
Java EE DataSources |
|
Managing JDBC |
|
Performance and tuning |
|
Using WebLogic Server with Oracle RAC |
|
Using JDBC drivers |
|