atom feed51 messages in org.apache.tomcat.usersRE: DBCP Woes!
FromSent OnAttachments
Peng AnnieOct 28, 2002 3:57 am 
Shapira, YoavOct 28, 2002 6:02 am 
Robert L SowdersOct 28, 2002 12:58 pm 
Shapira, YoavOct 28, 2002 1:07 pm 
Ricky LeungOct 28, 2002 3:22 pm 
Craig R. McClanahanOct 28, 2002 3:48 pm 
Craig R. McClanahanOct 28, 2002 4:15 pm 
nealOct 28, 2002 4:24 pm 
nealOct 28, 2002 4:55 pm 
Mike JacksonOct 28, 2002 4:55 pm 
nealOct 28, 2002 4:58 pm 
Robert L SowdersOct 28, 2002 5:42 pm 
Robert L SowdersOct 28, 2002 5:50 pm 
Bill BarkerOct 28, 2002 11:13 pm 
Peng AnnieOct 29, 2002 12:27 am 
David TildesleyOct 29, 2002 12:39 am 
Robert L SowdersOct 29, 2002 12:57 am 
Robert L SowdersOct 29, 2002 1:04 am 
Peng AnnieOct 29, 2002 1:08 am 
Robert L SowdersOct 29, 2002 2:01 am 
Mike JacksonOct 29, 2002 3:24 pm 
nealOct 29, 2002 3:39 pm 
Mike JacksonOct 29, 2002 3:43 pm 
Mike JacksonOct 29, 2002 4:02 pm 
micaelOct 29, 2002 4:05 pm 
nealOct 29, 2002 4:21 pm 
nealOct 29, 2002 4:31 pm 
nealOct 29, 2002 4:52 pm 
Iain SandersonOct 29, 2002 4:57 pm 
micaelOct 29, 2002 5:08 pm 
nealOct 29, 2002 5:15 pm 
Brandon CruzOct 29, 2002 5:17 pm 
nealOct 29, 2002 5:35 pm 
V. CekvenichOct 29, 2002 5:37 pm 
nealOct 29, 2002 5:43 pm 
nealOct 29, 2002 6:20 pm 
nealOct 29, 2002 6:47 pm 
Jacob KjomeOct 29, 2002 9:00 pm 
Craig R. McClanahanOct 29, 2002 10:15 pm 
nealOct 30, 2002 1:34 am 
Reynir HübnerOct 30, 2002 2:17 am 
Luc SanteramoOct 30, 2002 2:21 am 
nealOct 30, 2002 2:21 am 
nealOct 30, 2002 3:14 am 
omar...@telebahiacelular.com.brOct 30, 2002 3:50 am 
Tim FunkOct 30, 2002 3:54 am 
nealOct 30, 2002 4:40 am 
Mike JacksonOct 30, 2002 8:55 am 
Mike JacksonOct 30, 2002 8:58 am 
Craig R. McClanahanOct 30, 2002 9:50 am 
nealOct 30, 2002 1:10 pm 
Subject:RE: DBCP Woes!
From:Craig R. McClanahan (crai@apache.org)
Date:Oct 28, 2002 4:15:26 pm
List:org.apache.tomcat.users

On Mon, 28 Oct 2002, neal wrote:

Date: Mon, 28 Oct 2002 16:58:53 -0800 From: neal <neal@yahoo.com> Reply-To: Tomcat Users List <tomc@jakarta.apache.org> To: Tomcat <tomc@jakarta.apache.org> 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:dan@nuserve.com] Sent: Monday, October 28, 2002 3:55 PM To: neal@yahoo.com 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?