----- Original Message -----
From: "John McNally" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 23, 2003 8:54 PM
Subject: Re: [DBCP] AbandonedTrace - Connection Recovery


> > I get the impression that some of you believe connection cleanup is
> > difficult.  It really is trivial to properly dispose of connections in a
> > finally block.
>
> It is not always trivial.  Yes, you can have some high level try/finally
> block to clean up resources, but you must make sure the code in the
> finally block has access to a Connection reference.

ThreadLocal is used for this stuff.

Obviously, in the
> simple case where the Connection can be borrowed and returned in the
> same method, it is trivial.  Not every case is that easy.
>
> > It's even easier to find problems if you've properly
> > layered the app so the database calls are all in one place.
> >
>
> How do you do that when your application makes use of other components
> written by other teams/companies that have different policies.

Do not use broken code for production, but it must be possible to solve
without broken pool.

>
> john mcnally
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to