As far as I know the Oracle JDBC driver does not follow the specificiation. You should close your all objects in the following order:
1) ResultSet 2) Statement 3) Connection > -----Ursprüngliche Nachricht----- > Von: Tim Funk [mailto:[EMAIL PROTECTED] > Gesendet am: Freitag, 5. September 2003 13:02 > An: Tomcat Users List > Betreff: Re: Memory leaks? > > The JDBC spec states that when a connection is closed, all > dependent assets > should also be closed. So if you are using a pool, make sure > your pool is > compliant since the connection is never closed until the pool > closes it. > > When garbage collection runs is a whole different story. But > its just good > coding to close your ResultSet, Statements as soon as your > done with them. > > -Tim > > Nikola Milutinovic wrote: > > >>But depending on the DB, it can cause problems from the DB > with too many > >>open ResultSets... I had an issue with performance testing > where everything > >>but ResultSets were being closed and the Oracle DB started > throwing errors > >>after about 500 queries. Better safe than sorry. > > > > > > Well, from what I know, in general (not Oracle specific). > If you open a connection within some scope (Servlet, JSP, any > other class), then create a statement and finally a result > set, shouldn't deleting the most upper scope cause all these > "lower levels" be closed and garbage collected? > > > > With Servlets and JSP, of course, you have no control > whatsoever as to when they will be put out of service. But > suppose you are tidy and do a close on the connection - > shouldn't that clean-up the underlying Statement(s) and > ResultSet(s)? Even with connection pooling, this should work. > > > > Nix. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]