Michael McKibben wrote:

> How does a Recyclable object invalidate itself with the pool if for some
> reason the component cannot be restored to its original state? The recycle
> method does not allow for an exception to be thrown while being placed
> back into the pool. Should I throw a RuntimeException here?


That need has never been raised before.

A RuntimeException is dangerous in that if your object is used with a pool
that does not check for the RuntimeException, it will be passed to the
application.  That could cause some unpredictable issues that you would
rather avoid.


Look at the solution I came up with for the JdbcConnectionPool.



-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


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

Reply via email to