Bug 23586 - isConnected method in JDBCContentStore causes big performance overhead.
Summary: isConnected method in JDBCContentStore causes big performance overhead.
Status: RESOLVED WONTFIX
Alias: None
Product: Slide
Classification: Unclassified
Component: Stores (show other bugs)
Version: Nightly
Hardware: All All
: P3 critical (vote)
Target Milestone: ---
Assignee: Slide Developer List
URL:
Keywords:
: 14627 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-03 09:30 UTC by Piotr Walendziak
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Walendziak 2003-10-03 09:30:44 UTC
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.
Comment 1 Oliver Zeigermann 2003-12-18 12:53:13 UTC
JDBCContentStore and JDBCDescriptorsStore are no longer supported
Comment 2 Oliver Zeigermann 2003-12-18 12:54:12 UTC
*** Bug 14627 has been marked as a duplicate of this bug. ***