That's a good point. I was kicking around the idea of closing an
object any time an error was detected. This would be somewhat inefficient
if you have lots of errors caused by bad SQL or bad host names or whatever
as opposed to connections timing out, but presumably you would correct
that sort of thing before deploying. Would that be a good solution for
you? Or do you really need manual control over when to close objects
"permanently"?
Aaron
On Wed, 12 Jul 2000, ARAVIAS EFSTRATIOS wrote:
> I have build some kind of socket pooling that seems to work,
> based on the ObjectPool in miverva package.
> My question now is if the developer detects that the pooled
> resource that he has is no more functional (e.g. Underlying connection
> is closed) how can he inform the pool that this resource should not
> be reused again?
>
> I looked in ObjectPool and there is no function for releasing and object
> permantly. I can of course always create a subclass of ObjectPool,
> but i think that this functionality should be included in ObjectPool.
> e.g. releaseObjectPermantly()
> and also in objectError() we can use this function.
> Another perhaps simpler solution is to modify the prepareObject in the
> PoolObjectFactory
> abstract class so that it throws an exception. This gives the ability to the
> developer to test the underlying connection before returning it to the
> client and throw
> an exception if it is not ok.
>
> Thanks
> Stratis
>
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]