Useful to defer application initialization until a database has started up. Particularly appropriate for waiting on a slowly starting Oracle database.
| Modifier and Type | Field and Description |
|---|---|
| private DataSource | |
| public static final int | DEFAULT_INTERVAL
The default interval. |
| public static final int | DEFAULT_TIMEOUT
The default timeout. |
| private int | |
| protected final Log | |
| private int | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. |
| public void | |
| public void | |
| public void | |
| public void | setValidationQuery(String validationQuery)
Deprecated
as of 5.3, in favor of the JDBC 4.0 connection validation
Set the SQL query string to use for validation.
|
| dataSource | back to summary |
|---|---|
| private DataSource dataSource
| |
| DEFAULT_INTERVAL | back to summary |
|---|---|
| public static final int DEFAULT_INTERVAL The default interval. | |
| DEFAULT_TIMEOUT | back to summary |
|---|---|
| public static final int DEFAULT_TIMEOUT The default timeout. | |
| interval | back to summary |
|---|---|
| private int interval | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| timeout | back to summary |
|---|---|
| private int timeout | |
| validationQuery | back to summary |
|---|---|
| private String validationQuery
| |
| DatabaseStartupValidator | back to summary |
|---|---|
| public DatabaseStartupValidator() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. 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 | back to summary |
|---|---|
| public void setDataSource(DataSource dataSource) Set the DataSource to validate. | |
| setInterval | back to summary |
|---|---|
| public void setInterval(int interval) Set the interval between validation runs (in seconds). Default is 1. | |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(int timeout) Set the timeout (in seconds) after which a fatal exception will be thrown. Default is 60. | |
| setValidationQuery | back to summary |
|---|---|
| public void setValidationQuery(String validationQuery)
Deprecated as of 5.3, in favor of the JDBC 4.0 connection validation Set the SQL query string to use for validation.
| |