avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <leosim...@apache.org>
Subject Re: [proposal] avalon logging
Date Wed, 21 Jan 2004 22:33:48 GMT
Stephen McConnell wrote:
> The repository package lets you create an object using a common factory 
> pattern.  It hides the problems related to building the object that is 
> returned including the implementation classloader with the related 
> implementation classes).

that sounds an awful lot like a description of a container. Confused 
over here :/

> So for example, let say you wanted a LogKit 
> logging solution - you would use the repo to create this based on an 
> artifact url (e.g. "artifact:avalon-logging/logkit/logkit-impl").

how different is this from sourceresolve (for example)?

> The repo will construct the classloader with all of the stuff needed for a 
> logkit logging strategy together with a logging system configuration.

so it sorta handles the ClassWorlds job as well, configuring things 
avalon-style. Right?

> The factory implementation would read the configuration and identify the 
> target factories that required.  For each target factory (e.g. File, 
> JDBC, JMS, LF5, Servlet, whatever, the factory implementation would use 
> the repository facility to load each target factory.

so basically you want to add an alternative logger factory 
implementation that delegates a lot of functionality to a repository 
implementation. Right? Why is that backwards-incompatible?

>  This means that 
> any implementation resources (e.g. servlet stuff, or JMS stuff gets 
> pushed into its own classloader - and that dependencies for the 
> respective solutions are handled automatically by the repository).

My gut feeling persists.....it seems to me that a logger service should 
not be aware of classloader issues or anything like that, but rather, 
the active thing inside the repository (I'd call it kernel but that 
doesn't really apply with merlin...more like one of the appliance bits I 
think) sets that up and just puts the log management facility in there. 
Inversion of Control, I guess....

The logger service is just a passive component that knows how to 
construct loggers based on its configuration and some simple parameters. 
Containers (appliances, repositories) use it to do just that. It sounds 
like you are introducing a sort-of-container-dependency (the repository 
package filling a container-side role in a container-component 
relationship, and the logger factory using it) in a component. Which 
sounds bad.

I hope I still don't get it 8-)

Oh well, I used to be unhappy about the logger package anyway...I've 
learned to ignore that feeling over time :D


- Leo Simons

Weblog              -- http://leosimons.com/
IoC Component Glue  -- http://jicarilla.org/
Articles & Opinions -- http://articles.leosimons.com/
"We started off trying to set up a small anarchist community, but
  people wouldn't obey the rules."
                                                         -- Alan Bennett

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

View raw message