tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Gooding <>
Subject Re: [OT] ConnectionPool question
Date Wed, 11 Nov 2009 20:22:42 GMT

I AM going to use Elli's suggestion.  It's going to take some time, but I
don't have to worry, once it's done, it'll be done correctly.

Not only did I get yelled at for having the audacity to write up procedures
for the developers on my team (assuming I ever get a another team), but I
told my company that the procedures I wrote up needed to be used on ALL dev
teams.  I thought 99% of it was common sense, but I guess not.

On Tue, Nov 10, 2009 at 3:40 PM, Christopher Schultz <> wrote:

> Hash: SHA1
> Josh,
> On 11/10/2009 9:18 AM, Josh Gooding wrote:
> > the reason there are multiple recycleConnection methods is because if a
> RS
> > is passed to the front presentation layer, I have to have a way to close
> it,
> > I have to be able to get the statement and connection somehow, and I
> don't
> > want that in my code.
> I was assuming that you were going to use Elli's suggestion to use a
> ThreadLocal to capture any allocated Connection objects, and just close
> everything at the end of the request processing.
> If you're going to do that, you can be lazy about it and just always
> close everything.
> >>From everything that everyone here has said, to semi fix this right:
> >
> > 1 - Each method that calls the DB for a RS needs to get it's own
> connection
> > and close the resources itself (keeping it in the same scope)
> This is, of course, recommended technique.
> > 2 - The CP wrapper that is here, CAN be used, but could end up causing
> more
> > problems in the long run.
> Well, yes and no. "Yes" in the sense that you shouldn't encourage the
> kind of coding behavior that's been exhibited in the past: by writing
> such a wrapper and clean-up code, you (might) encourage laziness and
> make the problem worse rather than better. "No" in the sense that I
> don't believe this solution is actually going to exacerbate the actual
> problem itself.
> Good luck,
> - -chris
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla -
> 2X4AoKyfvWVdOv59FJtxMrw4nyLxsrk9
> =WWP3
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message