commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <>
Subject RE: [Pool] Pool events
Date Sun, 17 Aug 2003 23:31:50 GMT

> I'm planning to implement pool events. This is already discussed on the
> dev list before but never implemented.

I've been following the discussion related to NotifyingCollections.  Any
reason not to share constructs?  Seems to me that a NotifyingCollection and
a MonitoringObjectPool are similar in many ways, and there is likely to be
common available code.

> Pool events would create a nice extention mechanism without having to
> subclass.  A first use of these pool events would be logging for the
> dbcp component.

Absolutely.  All references to System.out.println should be excised.

> methods will be called from a wrapper class MonitoringObjectPool,
> thus avoiding having to modify all pool implementations.

I will argue that such an approach is likely to be insufficient.
Internally, the pool code needs some limited callback mechanism if you are
going to allow, for example, exceptions to be logged.  I agree with the
general approach; just pointing out where you may need to link core code and
the MonitoringObjectPool.

Method naming should follow the Java Beans specification.

	--- Noel

View raw message