commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject [pool] Interceptors
Date Sat, 08 Aug 2015 23:35:14 GMT
Tomcat's jdbc-pool has an interceptor feature that allows custom
code to be inserted into methods called on connections managed by
the pool.  In [pool], we have the core infrastructure to support
this in a generic way via the ProxiedObjectPool.  I propose that we
extend this to allow users to configure interceptors to be called
when registered methods are invoked on checked out objects.  I
haven't really thought through how configuration would work, but
basically clients would register methods and possibly interceptor
properties and the interceptors would get references to the method,
arguments, pool and pooled object.  Configuring interceptors in a
GOP or GKOP would cause it to be wrapped in a ProxiedObjectPool. 
Eventually, we could use this [pool] capability to enable the kind
of thing that jdbc-pool provides with its interceptors in DBCP. 
With [pool] itself, I could see providing method stats collectors,
abandoned timer reset (avoiding having to implement use()) and maybe
a pooled object properties cache.   If there are no objections, I
will open a JIRA and start experimenting.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message