You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bu...@apache.org on 2003/10/03 11:30:45 UTC
DO NOT REPLY [Bug 23586] New: -
isConnected method in JDBCContentStore causes big performance overhead.
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