This interface is used to wrap the SmartPool to an existing connection pool.
To wrap the SmartPool to an existing pool, provide an instance of
this interface in the configuration file. SmartPool will then draw
connection from this pool rather then drawing raw connections to the
pool.
Also if the SmartPool is wrapped around another pool
it will draw a connection on every call by calling
ConnectionProvider.getConnection().
Similarly when you call Connection.close(), SmartPool returns the
connection back to the original pool immediately by calling
ConnectionProvider.returnConnection().
In short when this feature is used, SmartPool is just another layer of
indirection. SmartPool does not maintain any pool. This has been
specifically designed to do so. This is because the external pool to which
SmartPool is wrapped is expected to do all the pooling. SmartPool can be
used to detect leaks and monitor live connections etc.
|