On Mon, 28 Oct 2002, neal wrote:
> Date: Mon, 28 Oct 2002 16:58:53 -0800 > From: neal <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat <[EMAIL PROTECTED]> > Subject: RE: DBCP Woes! > > I was releasing them in the Try, not the finally - just after requesting a > connection and using a connection. In other words, if any sort of exception occurred *after* the connection was retrieved and *before* the connection was closed, the close would get skipped, right? > I see your point that this isn't ideal and I should change definitely change > this. It's far worse than "not ideal" -- it's basically broken. A fundamental principle of borrowing resources from a pool (be they connections or whatever) is that you must *always* return them, no matter what happens. > Still though, unless enough errors occured (after the conneciton > requerst and before the conneciton release) to deplete my pool (in this case > 100), this shouldn't have exhausted my pool shoult it have? Sounds like you might want to put some counters and/or debug logging into your code and do some tests to demonstrate what's really happening. Don't forget to check 100% of the places that you use connections from the pool, from the moment that Tomcat is started. > > Thanks. > Neal Craig > > > -----Original Message----- > From: Dan Lipofsky [mailto:danlip@;nuserve.com] > Sent: Monday, October 28, 2002 3:55 PM > To: [EMAIL PROTECTED] > Subject: Re: DBCP Woes! > > > Are you releasing connections in the "finally" > block of a try/catch/finally statement? > - Dan > > > DBCP works fine initially but seems the conn pool is exhausted quickly, as > > if the connections aren't being released. But I made sure last night that > > every Sonnection and Statement object is closed and nullified so I am > > suprised Im still having this error. > > > > On thing of interested. Prior to receiving the connection pool exhausted > > error, I recieve this error: > > > > javax.naming.NameNotFoundException: Name jdbc is not bound in this Context > > > > Might this mean there is something else, other than simple release of > > Connections happening here? Any ideas what this might mean? > > > -- > To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org> > > -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>
