james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Federico Barbieri <scoo...@betaversion.org>
Subject Re: [LONGISH] the thorny problem of MailetConfig.getInitParameterNames()
Date Thu, 15 Feb 2001 00:07:50 GMT
Joel Gluth wrote:
> Hi list.
> So. org.apache.james.core.MailetConfigImpl is left with a contract it is
> unable to fulfill, namely the MailetConfig interface. Since using Avalon
> to do configuration is pretty deeply rooted in the design of JAMES,
> there are two options: convince the (seemingly heavily Pattern-oriented)
> Avalon team to change their interface, or to change MailetConfig.

Yes I am pattern oriented and proud to be! :-) 
The idea about Configuration is "you know what you're doing" so if you
need a value you should know the name of the element containing that
value. Makes sense doen't it?
So from my point of view the getInitailParamenteNames is kinda wrong

But don't worry there is an alternative. if you spec mailet
configuration to be in the form:

<param name="" value=""/> 

or like you can then conf.getChildren("param") in the MailetConfigImpl
and get things running. 
This means (from a pattern oriented point of view) Configuration do not
allow discovery, Parameters do, so you enforce a contract on conf to be
able to write an adapter between the two. 

Is that accetable?


View raw message