[PATCH] Fixed open cursor leaks in Oracle by closing all ResultSets and PreparedStatements
Michael Jaszczyk <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
-- PIRONET NDH Michael Jaszczyk - Director Software Maarweg 149 - 161, 50825 Cologne - Germany Phone: +49 (0)221 770 1720 - Fax: +49 (0)221 770 1005 <mailto:[email protected]> - <http://www.pironet-ndh.com/>
Users.patch
(text/plain, 1.2 KB)
Index: Users.java
===================================================================
RCS file: /cvsroot/openjms/openjms/src/main/org/exolab/jms/persistence/Users.java,v
retrieving revision 1.3
diff -u -w -i -b -r1.3 Users.java
--- Users.java 7 Aug 2003 13:33:07 -0000 1.3
+++ Users.java 5 Jan 2004 08:50:56 -0000
@@ -227,6 +227,7 @@
throw new PersistenceException("Users.remove failed "
+ error.toString());
} finally {
+ SQLHelper.close(set);
SQLHelper.close(getUser);
}
}
@@ -262,6 +263,7 @@
throw new PersistenceException("Users.remove failed "
+ error.toString());
} finally {
+ SQLHelper.close(set);
SQLHelper.close(getUsers);
}
@@ -300,13 +302,8 @@
throw new PersistenceException("Error in Users.load "
+ error.toString());
} finally {
- if (select != null) {
- SQLHelper.close(select);
- }
-
- if (set != null) {
SQLHelper.close(set);
- }
+ SQLHelper.close(select);
}
}