https://issues.apache.org/bugzilla/show_bug.cgi?id=48817

--- Comment #7 from Matt Passell <mpass...@grovehillsoftware.com> 2010-05-14 
11:49:20 EDT ---
Created an attachment (id=25439)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25439)
Add Validator interface and references to it where appropriate

Here's an alternative which I actually prefer.  I've added a Validator
interface with the following single method:
public boolean validate(Connection connection, int validateAction)

I also added get/setValidator() to PoolConfiguration and all of its
implementors. When validation runs, if the configuration has a Validator, it's
used in place of other forms of validation.  One thing that's nice about this
approach is that it pulls the call to Connection.isValid() out of the core
code.  Since I know I'll be running in a Java 6 environment, I can safely call
the isValid() method directly from my Validator implementation instead of
needing to use reflection to preserve Java 5 compatibility.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to