JBoss.org Community Documentation

14.7.1. Valid connection checking

The simplest format is to just run a "quick" sql statement:

<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>

before handing the connection to the application. If this fails, another connection is selected until there are no more connections at which point new connections are constructed.

The potentially more performant check is to use vendor specific features, e.g. Oracle's or MySQL's pingDatabase() via the