This chapter includes the following sections:
For instructions, see Target JDBC data sources in the Oracle WebLogic Server Administration Console Online Help.
To minimize the chances of the server hanging during start-up, use the
JDBCLoginTimeoutSeconds attribute on the ServerMBean.
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.