james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: [Mailet API] Logging Proposal
Date Tue, 11 Jun 2002 14:54:37 GMT
> If you are going to add (or link) the avalon framework logging
> components to the Mailet API, then why only add one part of the
> framework.

> the question becomes do we link the Mailet API to the avalon framework
> components.

Yes, the real question is how to make use of the Avalon programming MODEL in
the Mailet SDK.  The answer is that if you adopt the Avalon model, you do
keep clean interfaces because Avalon builds components by composition of
interfaces.  Other approaches, e.g., the current Servlet API, are less
finely factored.  This is a reason why the JSR 111 specification refers to
refactoring existing API sets in time.

However, you cannot discard the Avalon programming model AND leave
functionality out of the API.  Doing THAT forces non-standardization.  So
for each functional area, you have three choices:

 (a) Adopt the Avalon programming model,
 (b) Support the functional area in the API,
 or (c) accept that the functionality will be non-standard, non-portable,
platform-specific.

> To write a simple request/response Servlet, all you need is the stripped
down
> Servlet API. No logging, no configuration, just handle the request and
response.

A Servlet container that does not support ServletConfig and ServletContext
is not a compliant container.  Perhaps you are unfamilar with
ServletContext.log()?  Logging is part of the Servlet API.  It isn't always
sufficient, which is why other schemes have been developed, but it is
present.

> One (theoretical) application would be a simple Servlet running on an
embedded
> device in a domestic appliance.  A web server in a fridge which responds
to a
> HTTP request with an XML fragment containing the current temperature.  No
logging
> API required, because there isn't anywhere to log to.

This is simply false.  It can be logged across the network.

> If we look at the Mailet API in the same way.

Then we (a) have a simple logging mechanism, (b) have platform specific
servlets that need better logging, and (c) have to ask ourselves why we
didn't adopt a better way after seeing the issues already brought out by
people writing servlets.  Or we skip ahead and actually HAVE a better way.

> Perhaps there are three projects in one.
> 1) The Mailet API (equivalent to Servlet).
> 2) The reference server implementation (equivalent to Tomcat).

If we adopt the Avalon programming model:

 (1) A clean Mailet API focused on matchers and mailet behavior
 (2) A list of mandates and options for Mailet Containers
 (3) A reference container

	--- Noel


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


Mime
View raw message