| java.lang.Object org.springframework.jdbc.support.DatabaseStartupValidator
DatabaseStartupValidator | public class DatabaseStartupValidator implements InitializingBean(Code) | | Bean that checks if a database has already started up. To be referenced
via "depends-on" from beans that depend on database startup, like a Hibernate
SessionFactory or custom data access objects that access a DataSource directly.
Useful to defer application initialization until a database has started up.
Particularly appropriate for waiting on a slowly starting Oracle database.
author: Juergen Hoeller since: 18.12.2003 |
Method Summary | |
public void | afterPropertiesSet() Check whether the validation query can be executed on a Connection
from the specified DataSource, with the specified interval between
checks, until the specified timeout. | public void | setDataSource(DataSource dataSource) Set the DataSource to validate. | public void | setInterval(int interval) Set the interval between validation runs (in seconds). | public void | setTimeout(int timeout) Set the timeout (in seconds) after which a fatal exception
will be thrown. | public void | setValidationQuery(String validationQuery) Set the SQL query string to use for validation. |
DEFAULT_INTERVAL | final public static int DEFAULT_INTERVAL(Code) | | |
DEFAULT_TIMEOUT | final public static int DEFAULT_TIMEOUT(Code) | | |
logger | final protected Log logger(Code) | | |
afterPropertiesSet | public void afterPropertiesSet()(Code) | | Check whether the validation query can be executed on a Connection
from the specified DataSource, with the specified interval between
checks, until the specified timeout.
|
setDataSource | public void setDataSource(DataSource dataSource)(Code) | | Set the DataSource to validate.
|
setInterval | public void setInterval(int interval)(Code) | | Set the interval between validation runs (in seconds).
Default is 1.
|
setTimeout | public void setTimeout(int timeout)(Code) | | Set the timeout (in seconds) after which a fatal exception
will be thrown. Default is 60.
|
setValidationQuery | public void setValidationQuery(String validationQuery)(Code) | | Set the SQL query string to use for validation.
|
|
|