open class DatabaseStartupValidator : InitializingBean
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
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. |
static val DEFAULT_INTERVAL: Int |
|
static val DEFAULT_TIMEOUT: Int |
open fun afterPropertiesSet(): Unit
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. |
|
open fun setDataSource(dataSource: DataSource): Unit
Set the DataSource to validate. |
|
open fun setInterval(interval: Int): Unit
Set the interval between validation runs (in seconds). Default is 1. |
|
open fun setTimeout(timeout: Int): Unit
Set the timeout (in seconds) after which a fatal exception will be thrown. Default is 60. |
|
open fun setValidationQuery(validationQuery: String): Unit
Set the SQL query string to use for validation. |