Hi, Some comments:
1) It is considered good parctice to clase all JDBC object when they
are not needed and free the underlying db resources as quicklya s
possible.
2) Closing connections before statements is obviously not correct but
probably harmless in most situations.
3) I would really hae liked to take peek at the connection pool your
are using to figure out what happens here. Where does this JdbcUtil
you are using coe from. Equinox?
Bernt
>>>>>>>>>>>> Xanana Gusmao wrote (2006-12-12 04:00:58):
> On reading the javadoc, it is mentioned that:
>
> A ResultSet object is automatically closed by the Statement object that
> generated it when that Statement object is closed, re-executed, or is used to
> retrieve the next result from a sequence of multiple results.
>
> Thus I don't close the ResultSet anymore.
>
> To solve the problem, Connection needs to be closed prior to Statements.
>
> e.g. This does not throw any SQLException
>
> finally
> {
> try
> {
> conn.close();
> statement.close();
> }
> catch( SQLException sqle )
> {
> ...
> }
> }
>
>
>
>
--
Bernt Marius Johnsen, Database Technology Group,
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway
pgprbtkzjxT6q.pgp
Description: PGP signature
