Summary: | In case of invalid or empty slqQuery connection are always invalidated without usefull information | ||
---|---|---|---|
Product: | Tomcat Modules | Reporter: | olamy <olamy> |
Component: | jdbc-pool | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alex-pub.apache-ant |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
olamy
2011-03-03 06:51:14 UTC
Although it seems similar to Bug 50660, the case of a `null` query is really a misconfiguration error. I think it should be treated differently from "invalid" SQL case and in case of `null` query throw RuntimeException that tells the user about misconfiguration. I also think that obvious configuration validation (validationQuery is null or empty, when validation is enabled ) has to happen when the connection is initialized (or better yet in ConnectionPool.init), because in my test it would not happen before the validationInterval would have expired, and a one-off message in the middle of log stream does not call to much attention. > I also think that obvious configuration validation (validationQuery is null or > empty, when validation is enabled ) has to happen when the connection is that would be a separate issue, feel free to open bugzilla issue This has been fixed in by adding a configuration option called logValidationErrors="true|false" in r1303031 |