In Apache Commons Pool 1, the class GenericObjectPool had the possibility to define three actions to react to an exhausted pool:
- Fail
- Block
- Grow
Now, in version 2 I do not see these three options and the class GenericObjectPool seems to have only the possibility to specify if the pool must block or not when exhausted.
According with method borrowObject
, it seems that the block when exhausted option only allows for covering actions FAIL and BLOCK. But how can I make the pool follow the GROW action?
I've found in the changelog
Therefore it should be possible to make it with the above configuration.