Created
March 18, 2016 20:14
-
-
Save juliojsb/d9c74f68fab69aa8ffc2 to your computer and use it in GitHub Desktop.
Automatic reconnect to database for Jboss EAP 6.x/AS7.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In your datasource section define background validation: | |
<validation> | |
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> | |
<background-validation>true</background-validation> | |
<validate-on-match>false</validate-on-match> | |
<background-validation-millis>15000</background-validation-millis> | |
</validation> | |
Or with validate on match: | |
<validation> | |
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql> | |
<background-validation>false</background-validation> | |
<validate-on-match>true</validate-on-match> | |
</validation> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment