Wildfly 31 not using the configured valid-connection-checker?

411 views
Skip to first unread message

Christoffer A. Nilsen

unread,
May 24, 2024, 7:50:25 AM5/24/24
to WildFly
After upgrading to Wildfly 31 all our applications are getting a lot of "Destroying connection that is not valid" warnings. In the stack trace I see JDBC4ValidConnectionChecker.java implementation of ValidConnectionChecker is being used instead of the configured OracleValidConnectionChecker.

Am I misunderstanding something, or is Wildfly not using the configured OracleValidConnectionChecker, if so, why?

Datasource/Validation standalone configuration:

<validation>
   <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
   <check-valid-connection-sql>select 1 from DUAL</check-valid-connection-sql>
   <validate-on-match>true</validate-on-match>
   <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
   <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
</validation>

Screenshot 2024-05-24 134538.png

Warning stacktrace:

2024-05-24T12:55:25,008 WARN  (EJB default - 1) IJ030027: Destroying connection that is not valid, due to the following exception: oracle.jdbc.driver.T4CConnection@7b12361d: java.sql.SQLException: Invalid connection: oracle.jdbc.driver.T4CConnection@7b12361d
        at org.jboss.ironjac...@3.0.8.Final//org.jboss.jca.adapters.jdbc.extensions.novendor.JDBC4ValidConnectionChecker.isValidConnection(JDBC4ValidConnectionChecker.java:61)
        at org.jboss.ironjac...@3.0.8.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:1369)
        at org.jboss.ironjac...@3.0.8.Final//org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnectionFactory.getInvalidConnections(BaseWrapperManagedConnectionFactory.java:1173)
        at org.jboss.iro...@3.0.8.Final//org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreConcurrentLinkedDequeManagedConnectionPool.getConnection(SemaphoreConcurrentLinkedDequeManagedConnectionPool.java:382)

Christoffer A. Nilsen

unread,
Jun 20, 2024, 10:46:01 AM6/20/24
to WildFly
Just to answer my own question, it seems to me that OracleValidConnectionChecker.class extends JDBC4ValidConnectionChecker.class, and all validation code is in the  JDBC4ValidConnectionChecker.class, therefore the stacktrace shows the  JDBC4ValidConnectionChecker.
Reply all
Reply to author
Forward
0 new messages