Description
The current CSF implementation is tightly coupled to SimplePool
. It would be nice to be able to use different Pool
implementations for the CSF.
Currently, the problem is in 2 methods that CSF exposes which are coupled to SimplePool
, namely:
public void setPoolSize(int poolSize)
and
public void setSessionWaitTimeout(long sessionWaitTimeout)
.
Would it be possible to change the SimplePool
field to a generic Pool
and add a new interface, PoolConfigurator
with these specific methods to maintain backwards-compatibility and mark the coupled methods and the new PoolConfigurator
as @Deprecated
? This would keep backwards-compatibility for some time while allowing for different Pool
s to be used.
A more generic method for customization could be used in the future: public void configurePool(Pool pool)
. To be able to configure the pool from XML, maybe something like: public void configurePool(Expression expression)
?
WDYT?