java.lang.Object | |
↳ | org.springframework.jdbc.support.DatabaseStartupValidator |
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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DEFAULT_INTERVAL | ||||||||||
int | DEFAULT_TIMEOUT |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.
| |||||||||||
Set the DataSource to validate.
| |||||||||||
Set the interval between validation runs (in seconds).
| |||||||||||
Set the timeout (in seconds) after which a fatal exception
will be thrown.
| |||||||||||
Set the SQL query string to use for validation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
|
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.
Set the interval between validation runs (in seconds). Default is 1.
Set the timeout (in seconds) after which a fatal exception will be thrown. Default is 60.
Set the SQL query string to use for validation.