Este contenido no está disponible en el idioma seleccionado.
14.7. Dead connections
The JDBC protocol does not provide a natural
connectionErrorOccured() event when a connection is broken. To support dead/broken connection checking there are a number of plugins.
14.7.1. Valid connection checking Copiar enlaceEnlace copiado en el portapapeles!
Copiar enlaceEnlace copiado en el portapapeles!
The simplest format is to just run a "quick" sql statement:
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.
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
The potentially more performant check is to use vendor specific features, e.g. Oracle's or MySQL's pingDatabase() via the
<valid-connection-checker-class-name/>