Re: [pool] Interceptors

2015-08-14 Thread Phil Steitz
On 8/8/15 4:35 PM, Phil Steitz wrote: > 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 propo

Re: [pool] Interceptors

2015-08-09 Thread Phil Steitz
On 8/9/15 2:08 PM, Phil Steitz wrote: > On 8/9/15 1:52 PM, James Carman wrote: >> Sorry, on my phone and can't see how to post online. My point is that it >> seems silly to reinvent the wheel when it comes to proxies and >> interceptors. That's precisely what Commons Proxy is designed to do. It >>

Re: [pool] Interceptors

2015-08-09 Thread James Carman
Ok suit yourself. On Sun, Aug 9, 2015 at 5:08 PM Phil Steitz wrote: > On 8/9/15 1:52 PM, James Carman wrote: > > Sorry, on my phone and can't see how to post online. My point is that it > > seems silly to reinvent the wheel when it comes to proxies and > > interceptors. That's precisely what Comm

Re: [pool] Interceptors

2015-08-09 Thread Phil Steitz
On 8/9/15 1:52 PM, James Carman wrote: > Sorry, on my phone and can't see how to post online. My point is that it > seems silly to reinvent the wheel when it comes to proxies and > interceptors. That's precisely what Commons Proxy is designed to do. It > already has pluggable proxy factories. Just

Re: [pool] Interceptors

2015-08-09 Thread James Carman
Sorry, on my phone and can't see how to post online. My point is that it seems silly to reinvent the wheel when it comes to proxies and interceptors. That's precisely what Commons Proxy is designed to do. It already has pluggable proxy factories. Just use that. On Sun, Aug 9, 2015 at 4:46 PM Phil

Re: [pool] Interceptors

2015-08-09 Thread Phil Steitz
Can we please not top-post. Gets hard to follow. On 8/9/15 10:17 AM, James Carman wrote: > Okay, how about this for a proposal? We create a new module in > commons-proxy called commons-proxy-pool which has a nice base class for > folks to be able to create proxy objects to be members of their po

Re: [pool] Interceptors

2015-08-09 Thread Matt Benson
On Aug 9, 2015 12:17 PM, "James Carman" wrote: > > Okay, how about this for a proposal? We create a new module in > commons-proxy called commons-proxy-pool which has a nice base class for > folks to be able to create proxy objects to be members of their pool. We > could call it ProxiedPoolableOb

Re: [pool] Interceptors

2015-08-09 Thread James Carman
Okay, how about this for a proposal? We create a new module in commons-proxy called commons-proxy-pool which has a nice base class for folks to be able to create proxy objects to be members of their pool. We could call it ProxiedPoolableObjectFactory or something like that. This class would have

Re: [pool] Interceptors

2015-08-09 Thread James Carman
If you want to decorate the calls to the pooled objects, then use commons proxy and a delegator proxy. Let's not bleed into other areas. Let pool concentrate on what it does best. On Sun, Aug 9, 2015 at 11:45 AM James Carman wrote: > I lean toward listeners instead. Much simpler > On Sun, Aug 9,

Re: [pool] Interceptors

2015-08-09 Thread James Carman
I lean toward listeners instead. Much simpler On Sun, Aug 9, 2015 at 11:35 AM Phil Steitz wrote: > On 8/9/15 8:07 AM, Oliver Heger wrote: > > > > > > On 09.08.2015 02:49, James Carman wrote: > >> Yep, same thing I said back in the day. Would we want it to be a > >> true > >> "interceptor" or more

Re: [pool] Interceptors

2015-08-09 Thread Phil Steitz
On 8/9/15 8:07 AM, Oliver Heger wrote: > > > On 09.08.2015 02:49, James Carman wrote: >> Yep, same thing I said back in the day. Would we want it to be a >> true >> "interceptor" or more of a "listener"? > > Sounds like a usual and interesting feature. IIUC the proposal of > Phil, it goes more in t

Re: [pool] Interceptors

2015-08-09 Thread Phil Steitz
On 8/8/15 5:49 PM, James Carman wrote: > Yep, same thing I said back in the day. Would we want it to be a true > "interceptor" or more of a "listener"? Actually, we are probably talking about two different things here, unless interceptors also get pool lifecycle events[1]. Most pool logging shoul

Re: [pool] Interceptors

2015-08-09 Thread Oliver Heger
On 09.08.2015 02:49, James Carman wrote: Yep, same thing I said back in the day. Would we want it to be a true "interceptor" or more of a "listener"? Sounds like a usual and interesting feature. IIUC the proposal of Phil, it goes more in the direction of interceptors. A point to keep in mi

Re: [pool] Interceptors

2015-08-08 Thread James Carman
Yep, same thing I said back in the day. Would we want it to be a true "interceptor" or more of a "listener"? On Sat, Aug 8, 2015 at 8:18 PM Phil Steitz wrote: > On 8/8/15 5:04 PM, James Carman wrote: > > We talked about this a while back with respect to logging,, having a > > PoolListener interf

Re: [pool] Interceptors

2015-08-08 Thread Phil Steitz
On 8/8/15 5:04 PM, James Carman wrote: > We talked about this a while back with respect to logging,, having a > PoolListener interface or something. Right. That could be one use. The nice thing there is the interceptor could bring in whatever logging / event propagation infrastructure it wanted

Re: [pool] Interceptors

2015-08-08 Thread James Carman
We talked about this a while back with respect to logging,, having a PoolListener interface or something. On Sat, Aug 8, 2015 at 7:36 PM Phil Steitz wrote: > Tomcat's jdbc-pool has an interceptor feature that allows custom > code to be inserted into methods called on connections managed by > the

[pool] Interceptors

2015-08-08 Thread Phil Steitz
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 confi