|
I started a Confluence page on this kind of thing for validating connections in Commons DBCP at:
http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures I have added some comments in the generated server.xml of the standalone to point to the doc for this issue. We can not have a cool implementation where we create a ping table and use that, I tried it and the problem is that the table has to exist so that the validation can succeed but we need a connection so that we can create the ping table. We would have to get a raw connection and generate 'create table' sql that will work on all supported db's and make sure that the table exists before we let JIRA run at all.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
With most drivers/databases, you can also do "select 1" - which is near-zero-cost, but does exercise the connection.