Search code examples
jdbcfirebirdconnection-poolingpayarajaybird

Firebird JDBC connection pool validation on Payara server


After a Firebird database crash the connections of the JDBC pool become invalid. (We have to flush the pool manually.) A good concept might be to use jdbc connection pool validation. Connection validation properties I am not sure what is the validation classname of the payara implementation, or in general what configuration works here. Is there a better way to handle the problem?


Solution

  • Thanks to Mark Rotteveel I have solved the problem. Also thanks for pointing out the importance of the jaybird driver upgrade. I used the following asadmin commands:

    • set resources.jdbc-connection-pool.jdbc_pool_name.connection-validation-method=custom-validation
    • set resources.jdbc-connection-pool.jdbc_pool_name.validation-classname=org.glassfish.api.jdbc.validation.JDBC40ConnectionValidation
    • set resources.jdbc-connection-pool.jdbc_pool_name.is-connection-validation-required=true
    • set resources.jdbc-connection-pool.jdbc_pool_name.fail-all-connections=true

    In my case the main cause of the error was a Firebird segfault. The configurations above have passed the tests.