On Thursday 01 August 2002 18:38, Leo Sutic wrote:
> > From: Peter Royal [mailto:[EMAIL PROTECTED]]
> >
> > when a Connection is gotten from the pool, create a new
> > Exception but don't
> > throw it. If a connection is gotten from the pool, used, and
> > then not closed,
> > throw that exception upon finalization (which you should be
> > able to force by
> > shutting the system down).
> >
> > .. thats the rough idea..
>
> That was pretty much exactly what I did in MicroContainer -
> if you tried to release a component twice, or forgot to
> release it, it would print out a stack trace via an Exception.
> Basically "You did not release the component you had obtained
> here: (stack trace)", or "You have already released the component
> here: (stack trace) that you obtained here: (stack trace)". A very
> useful thing (I think), so I can testify to the goodness of Peter's tip.
>
> Just one thing: Finalizers are not run on exit by default
> (although this does not make Peter's suggestion less useful):

Ah... thanks for the info! This seems to be a really usefull addition!
--
Torsten

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

Reply via email to