commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [Pool] Logging what's going on...
Date Fri, 19 Mar 2004 20:26:58 GMT
> A short term solution is of course to subclass and simply add some
> logging datatment to the borrow/return methods.

In Avalon, we're also talking about adapting Commons classes for use with
Avalon.  I'm not sure if subclassing is always going to put the log where
needed, but that is certainly one pattern that would go a long way.

So I think your proposal amounts to a pattern like:

   class AvalonComponent extends CommonsComponent
                         implements AvalonInterfaces

   {
       AvalonMethod(...) { ... };
       LoggedMethod(...) { ... super.LoggedMethod(...); ... }
   }

An alternative would be to use delegation, so that the AvalonComponent had
an instance of the CommonsComponent, but didn't expose the
CommonsComponent's interface.  Logging might still require subclassing,
though, in some cases.

That about sum it up?

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message