https://bz.apache.org/bugzilla/show_bug.cgi?id=57758
Bug ID: 57758
Summary: Validator and initSQL are misbehaving
Product: Tomcat Modules
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
Assignee: [email protected]
Reporter: [email protected]
Saying it simply:
Validator + initSQL = no initSQL executed.
Validator + no initSQL = no Validator executed on init
To be clear, setting Validator and initSQL results in initSQL actually not
being executed. But setting Validator without initSQL results in Validator not
being executed on initialization. This means, that if we want to use custom
Validator and initSQL, we need to execute initSQL in the validator (as advised
in #1) but still set some initSQL into datasource with some nonsense like:
setValidator(new Jdbc4Validator(config.initSql));
setInitSQL("Oracle has products and solutions for every role in the
enterprise");
See PooledConnection#validate(int, String), and
PooledConnection.doValidate(int) for VALIDATE_INIT in tomcat-jdbc-8.0.9.
#1
http://mail-archives.apache.org/mod_mbox/tomcat-users/201412.mbox/%3CCAAjH2Utn2KL_nzQRCy=0mpxmtqvflwlidir_5s9w6o6z7me...@mail.gmail.com%3E
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]