You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/02/26 06:23:59 UTC

DO NOT REPLY [Bug 48817] Skip validation query and use JDBC API for validation

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

--- Comment #1 from VickyKak <ka...@yahoo.co.in> 2010-02-26 05:23:56 UTC ---
 public boolean validate(int validateAction) {
        return validate(validateAction,null);
    }


There should be plugaable Validator which could be configured in the
poolProperties. e.g 

public boolean validate(int validateAction)
{
     ValidateAction vaction = this.poolProperties.getValidateAction();
     return vaction.validate();
}

where ValidateAction is an interface.

Some drivers e.g oracle provides ping() method on the driver which are faster
than running the SQL everytime you validate the connections, so having the
pluggable validator is more flexible approach.

Let me know what you think, I can provide a patch for this.

And for jdk1.6 we can have the validator which will use the jdbc specific API
i.e java.sql.Connection::isValid(int timeout)

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