https://issues.apache.org/bugzilla/show_bug.cgi?id=50759
Summary: ValidatorClassName Validation fails to set
lastValidated timestamp
Product: Tomcat Modules
Version: unspecified
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
AssignedTo: [email protected]
ReportedBy: [email protected]
When using a custom validator (48817), after the first validation event occurs,
every subsequent query on the connection results in the Validator being run. I
believe this is due to the lastValidated timestamp not being set when the
Validator class is run:
http://svn.apache.org/viewvc/tomcat/tags/JDBC_POOL_1_0_9_3/java/org/apache/tomcat/jdbc/pool/PooledConnection.java?revision=1061025&view=markup
(lines 419-420)
public boolean validate(int validateAction,String sql) {
...
if (poolProperties.getValidator() != null) {
return poolProperties.getValidator().validate(connection,
validateAction);
}
....
}
maybe should be:
public boolean validate(int validateAction,String sql) {
...
if (poolProperties.getValidator() != null) {
boolean val = poolProperties.getValidator().validate(connection,
validateAction);
this.lastValidated = now;
return val;
}
....
}
/dom
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]