Hi!
movie user schrieb:
> I have a makeObject() method inside the factory class. Now if this method
> throws any exception do I need to do pool.invalidateObject() in the catch
> block.
>
If an exceptions is thrown during pooled-object creation, the exception
will be propagated to the code requesting the object. So you have
nothing to invalidate in your code.
If you have the following code
|> Object obj = null;
|> try {
|> obj = pool.borrowObject();
|> [...]
|> } catch(Exception e) {
|> if (obj != null) pool.invalidateObject(obj);
|> }
then obj is null in this situation.
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]