This chapter describes WebLogic Java Database Connectivity (JDBC) data sources for WebLogic Server 12.1.3.
This chapter includes the following sections:
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.
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.
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:
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.
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 |
|