13 Deploying Data Sources on Servers and Clusters
- Deploying Data Sources on Servers and Clusters
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. - Minimizing Server Startup Hang Caused By an Unresponsive Database
To minimize the chances of the server hanging during start-up, use theJDBCLoginTimeoutSeconds
attribute on the ServerMBean.
Deploying Data Sources on Servers and Clusters
Parent topic: Deploying Data Sources on Servers and Clusters
Minimizing Server Startup Hang Caused By an Unresponsive Database
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.
Parent topic: Deploying Data Sources on Servers and Clusters