jakarta-slide-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23586] New: - isConnected method in JDBCContentStore causes big performance overhead.
Date Fri, 03 Oct 2003 09:30:45 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23586>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23586

isConnected method in JDBCContentStore causes big performance overhead.

           Summary: isConnected method in JDBCContentStore causes big
                    performance overhead.
           Product: Slide
           Version: Nightly
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Stores
        AssignedTo: slide-dev@jakarta.apache.org
        ReportedBy: pwalendziak@yahoo.com


In isConnected method in class JDBCContentStore and JDBCDescriptorsStore there 
is added BIG performance overhead on checking if connection is valid. It is 
checked not only if connection is present but also by doing several unnecessary 
calls:

 public boolean isConnected()
         throws ServiceAccessException {
         try {
             if ((connection == null) || 
             (connection.isClosed())) //NOT NEEDED{
                 return false;
             }
             
             PreparedStatement statement = 
                 connection.
prepareStatement(getDatabaseConnectionTestStatement());//NOT NEEDED
             statement.executeQuery();//NOT NEEDED
             statement.close();//NOT NEEDED
             
             // testStatement executed without throwing an exception
             return true;
             
         } catch (SQLException e) {
             throw new ServiceAccessException(this, e);
         }
     }

Normal DB software does not check validity of connection. Slide running on DB 
spends on this most of its time.

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Mime
View raw message