Вы находитесь на странице: 1из 2

Create JDBC data sources: [1] First, make sure that the JDBC drivers you want to use

to create db connections are installed on all servers on which you want to deploy the data source. Some J DBC drivers are installed with weblogic server, including Weblogic Type 4 JDBC d rivers for DB2, Oracle etc. In WL server, you configure db connectivity by adding JDBC data sources. A data source is a J2EE standard method of configuring connectivity to a db.Each Web lo gic data source contains a pool of database connections. Applications look up the data source on the JNDI tree or in the local applicatio n context and then reserve a database connection with the getConnection method. Data sources and their connection pools provide connection management processes that help keep your system running and performant. [2] To create a JDBC data source: 1.If you have not already done so, in the Change Center of the Administration Co nsole, click Lock & Edit (see Use the Change Center). 2.In the Domain Structure tree, expand Services > JDBC, then select Data Sources . 3.On the Summary of Data Sources page, click New. 4.On the JDBC Data Sources Properties page, enter or select the following inform ation: Name - Enter a name for this JDBC data source. This name is used in the configur ation file (config.xml) and throughout the Administration Console whenever refer ring to this data source. JNDI Name - Enter the JNDI path to where this JDBC data source will be bound. Ap plications look up the data source on the JNDI tree by this name when reserving a connection. Database Type - Select the DBMS of the database that you want to connect to. If your DBMS is not listed, select Other. Database Driver - Select the JDBC driver you want to use to connect to the datab ase. The list includes common JDBC drivers for the selected DBMS. Note: You must install JDBC drivers before you can use them to create database c onnections. Some JDBC drivers are installed with WebLogic Server, but many are n ot installed. [3] Applications get a database connection from a data source by looking up the data source on the Java Naming and Directory Interface (JNDI) tree and then requesti ng a connection. The data source provides the connection to the application from its pool of database connections. This page enables you to define general configuration options for this JDBC data source. Connection Pool Features Each JDBC data source has a pool of JDBC connections that are created when the d ata source is deployed or at server startup. Applications use a connection from the pool then return it when finished using the connection. Connection pooling e

nhances performance by eliminating the costly task of creating database connecti ons for the application.

Вам также может понравиться