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

           Summary: In case of invalid or empty slqQuery connection are
                    always invalidated without usefull information
           Product: Tomcat Modules
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: ol...@apache.org


The code is (in PooledConnection.java#validate(int validateAction,String sql) )
        Statement stmt = null;
        try {
            stmt = connection.createStatement();
            stmt.execute(query);
            stmt.close();
            this.lastValidated = now;
            return true;
        } catch (Exception ignore) {
            if (log.isDebugEnabled())
                log.debug("Unable to validate object:",ignore);
            if (stmt!=null)
                try { stmt.close();} catch (Exception ignore2){/*NOOP*/}
        }
        return false;

So in the case of null or invalid query (connection is always invalidated :
seems normal :-) ).
But without any usefull message (except if you use debug : but seems
complicated in a production env).
So IMHO adding a log.warning in case of null query could be usefull.

-- 
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