I currently have a configuration in my Data-source tags of Standalone.xml of jboss 7 to connect to a Secondary Database on Fail over from Primary Database.This is happening Fine.
Can i make my jboss 7 to check for primary DB connection every now and then so that if the Failed Primary Database has come up now, inform jboss to connect back to primary Database?
you need to add this piece of xml in your datasource
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
<validate-on-match>true</validate-on-match>
</validation>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With