jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dhiru Pandey <Dhiru.Pan...@Sun.COM>
Subject [Standard][PATCH]Fix for QueryTagSupport.java
Date Wed, 15 Dec 2004 00:13:19 GMT
Hello All,

We need the following change to


This is needed because in the current implementation, if an error occurs
before the preparedStatement is closed, then the closing of the
preparedStatement would depend on the implementation of finalize() for
the PreparedStatement class which should be called when that object is
GCed (Garbage Collected). This is not a good practice since:

a) we should not depend on the implementation of the finalize() method
      in PreparedStatement
b) the invocation of the finalize() method is not guaranteed by the JVM.
      So even if finalize() does call close(), there is no guarantee
      that finalize() itself will be called when this object is GCed
      and we may continue to see memory leaks and resource leaks
      as reported in Bug 17388 (Result set created in query tag is never
      released + update tag)


View raw message