This chapter includes the following sections:
To deploy a data source to a cluster or server, you select the server or cluster as a deployment target. When a data source is deployed on a server, WebLogic Server creates an instance of the data source on the server, including the pool of database connections in the data source. When you deploy a data source to a cluster, WebLogic Server creates an instance of the data source on each server in the cluster.
For instructions, see Target JDBC data sources in the Oracle WebLogic Server Administration Console Online Help.
On server startup, WebLogic Server attempts to create database connections in the data sources deployed on the server. If a database is unreachable, server startup may hang in the
STANDBY state for a long period of time. This is due to WebLogic Server threads that hang inside the JDBC driver code waiting for a reply from the database server. The duration of the hang depends on the JDBC driver and the TCP/IP timeout setting on the WebLogic Server machine.
To work around this issue, WebLogic Server includes the
JDBCLoginTimeoutSeconds attribute on the ServerMBean. When you set a value for this attribute, the value is passed into
java.sql.DriverManager.setLoginTimeout(). If the JDBC driver being used to create database connections implements the
setLoginTimeout method, attempts to create database connections will wait only as long as the timeout specified.
An alternative is to set the
Initial Capacity for the data source to 0. That means that no connections are created when the data source is deployed and the database need not even be available at that time. Connection creation is deferred until the application needs them.