Package org.frankframework.lifecycle
Class VerifyDatabaseConnectionBean
java.lang.Object
org.frankframework.lifecycle.VerifyDatabaseConnectionBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
public class VerifyDatabaseConnectionBean
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Verifies if a (valid) connection can be made.
This class uses JDBC4 isValid which may not always work properly.
As an additional step it not only verifies the socket is open but also usable.
In addition it verifies if the TransactionManager can see/use the database and if the connections are using a TX isolation level
- Author:
- Niels Meijer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
VerifyDatabaseConnectionBean
public VerifyDatabaseConnectionBean()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-