이 콘텐츠는 선택한 언어로 제공되지 않습니다.
18.6. 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 plug-ins.
18.6.1. Valid connection checking 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Valid connections can be checked with an SQL statement (as shown below) before handing the connection to the application.
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
If this fails, another connection is selected until there are no more connections at which point new connections are constructed.
A potentially more performant check is to use vendor specific features, for example Oracle or MySQL's
pingDatabase()
tool:
<valid-connection-checker-class-name/>
<valid-connection-checker-class-name/>