reply inline.
Greg Steuck <[EMAIL PROTECTED]>@home.nest.cx on 06/02/2003 12:59:45 Please respond to "Avalon Developers List" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: excalibur datasource: AbstractJdbcConnection.close leaks statements Hello, we just moved our app to excalibur datasource (leaving WebLogic). Now, I am seeing cursor exhaustion from the database. The offending code on the client side goes something like: Connection conn = dataSource.getConnection(); try { Statememnt st = conn.createStatement("..."); ResultSet rs = st.executeStatement(); } finally { // connection is closed, but dependent objects are NOT conn.close(); } Here we depend on a somewhat underspecified contract of java.sql.Connection.close(), which states: Releases a Connection's database and JDBC resources immediately instead of waiting for them to be automatically released. So, our reading of this is: all statements allocated on the connection will be closed. Apparently our reading doesn't match that of AbstractJdbcConnection, which doesn't close the statements open on the original connection. Such mismatch creates orphaned Statements, ResultSets, and ultimately database cursors. <reply> Unfortunately (as you discovered) all resources are not freed. FWIT I ensured that: the ResultSet is closed; the Statement is closed and that the connection is closed! </reply> **************************************************************** NOTICE - This message is intended only for the use of the addressee named above and may contain privileged and confidential information. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action based upon it. If you received this message in error please notify HIC immediately. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of HIC. **************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]