mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Tidied up resource handling that was causing scalability problems
git-svn-id: http://scm.dspace.org/svn/repo/trunk@1251 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -842,9 +842,21 @@ public class Browse
|
||||
return totalInIndex;
|
||||
}
|
||||
|
||||
PreparedStatement statement = createSql(scope, itemValue, true, true);
|
||||
|
||||
return getIntValue(statement);
|
||||
PreparedStatement statement = null;
|
||||
try {
|
||||
statement = createSql(scope, itemValue, true, true);
|
||||
return getIntValue(statement);
|
||||
}
|
||||
finally {
|
||||
if(statement != null) {
|
||||
try {
|
||||
statement.close();
|
||||
}
|
||||
catch(SQLException e) {
|
||||
log.error("Problem releasing statement", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int getPosition(int total, int matches, int beforeFocus)
|
||||
|
Reference in New Issue
Block a user