avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <darr...@apache.org>
Subject Re: Context: usage recommendations? ( Re: [SUMMARY] Context )
Date Mon, 02 Dec 2002 11:38:46 GMT
On Mon, 2 Dec 2002 21:16, Paul Hammant wrote:
> Nicola,
>
> > This is how James uses the Context:
> > http://jakarta.apache.org/james/mailet/org/apache/mailet/MailetContext.ht
> >ml
> >
> > - What would data-only-usage Context advocates do with it? What problems
> > does it pose?
> > - Why is this (for method-containing Context advocates) the best
> > solution? - Why do I have a Context interface when in fact the Context is
> > used even without actually needing the specified method?
> >
> > If we don't discuss on real code, we won't get anywhere.
>
> A perfect world (contentious) JAMES would have MailetContext extending
> Context and being handed in to a component by Contextualize.  This is not
> the case now.
>
> I agree though that it would represent a good real world case if that were
> so.

I'm not sure that this is a great example. The MailetContext shares little in 
common with the Avalon Context, other than a name. It's the way that a 
MailetContainer (potentially very different from an Avalon Container) 
provides contextual information to a Mailet, which is a domain-specific 
component running in a well-defined environment.

I'd like to see the base MailetContext stay Avalon-unaware if possible. If 
it's possible (and we'll be discussing this in the up-and-coming James3 
development round), then you may as well be using the ServletContext as a 
model for your discussions.

One possibility (thinking out loud now), is that James could provide 2 set of 
context to Mailets:- a MailetContext and an AvalonContext. So a mailet writer 
could choose to be Mailet-container-agnostic and only use the Avalon-unaware 
MailetContext, but they could also choose to implement Contextualizable and 
get the full power of Avalon and all the services provided. In the latter 
case, however, they wouldn't be able to run on the rival MailetContainer 
secretly being developed by the JBoss team :).

-- 
cheers,
Darrell DeBoer

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


Mime
View raw message