Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 19875 invoked from network); 23 Jul 2003 13:20:30 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 23 Jul 2003 13:20:30 -0000 Received: (qmail 2826 invoked by uid 97); 23 Jul 2003 13:23:03 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 2819 invoked from network); 23 Jul 2003 13:23:03 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 23 Jul 2003 13:23:03 -0000 Received: (qmail 19656 invoked by uid 500); 23 Jul 2003 13:20:27 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 19641 invoked from network); 23 Jul 2003 13:20:26 -0000 Received: from unknown (HELO kaunas.mediaworks.lt) (193.219.160.115) by daedalus.apache.org with SMTP; 23 Jul 2003 13:20:26 -0000 Received: from amavis by kaunas.mediaworks.lt with scanned-ok (Exim 3.35 #1 (Debian)) id 19fIcg-0004Hk-00 for ; Wed, 23 Jul 2003 14:21:34 +0200 Received: from adsl-213-190-44-220.takas.lt ([213.190.44.220] helo=juozas) by kaunas.mediaworks.lt with asmtp (Cipher TLSv1:RC4-MD5:128) (Exim 3.35 #1 (Debian)) id 19fIce-0004Hc-00 for ; Wed, 23 Jul 2003 14:21:33 +0200 Message-ID: <002801c35125$af1785a0$a901a8c0@juozas> From: "Juozas Baliuka" To: "Jakarta Commons Developers List" References: <20030722141011.86734.qmail@web20709.mail.yahoo.com> <3F1D5EB0.7040104@mail.more.net> <00de01c35076$a2d3fa30$0111010a@user> <1058931338.1603.266.camel@localhost.localdomain> <3F1E861A.8090201@mail.more.net> Subject: Re: [DBCP] AbandonedTrace - Connection Recovery Date: Wed, 23 Jul 2003 16:21:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Virus-Scanned: by AMaViS 0.3.12 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N /** * Get a db connection from the pool. * * If removeAbandoned=true, recovers db connections which * have been idle > removeAbandonedTimeout. * * @return Object jdbc Connection */ As I remember we have decided to log stack trace, but not to break pool. Is this code released as commons component ? ----- Original Message ----- From: "Glenn Nielsen" To: "Jakarta Commons Developers List" Sent: Wednesday, July 23, 2003 2:56 PM Subject: Re: [DBCP] AbandonedTrace - Connection Recovery > John McNally wrote: > > [snip] > > > > > On the implementation. I have not looked closely at the current > > implementation as it is not used by the pool that I added to dbcp and I > > was trying to start it as a simple implementation of the latest > > specification. But it would seem an implementation of this should just > > maintain a reference to Connection objects that it hands out and then > > after the allowed time period, it should call Connection.close(). The > > current jdbc specification states that a Connection object should not be > > usable after Connection.close() is called and the jdbc2pool > > implementation does not allow the Connection object to be used after > > close is called. Note that implementation is not perfect in that it > > needs to use wrapper implementations of Statement and ResultSet. But > > the idea is that once Connection.close() is called it should be safe for > > the pool to use the PooledConnection, which represents the physical > > connection, to create another Connection object which it can hand out. > > It doesn't seem like an implementation that just calls > > Connection.close() needs to be that coupled to the rest of the pool code > > and a simple event/listener model is not likely to add a bug to the main > > code. > > > > The current implementation recover's the abandoned connection based > on an inactivity timeout. So it has to track the last time the > connection was used. This more tightly couples it to DBCP. > > Regards, > > Glenn > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org