Serge Knystautas wrote:
>
> Federico,
>
> Glad to see you're actively working on James. I should be leaving for a
> meeting now, but here are my quick 2 cents: My approach was designed on
> the assumption that 90%-95% of the time, you're not making a significant
> change to the email message (if any)... you're changing a header,
> rerouting this message, etc... My approach was more a mail filter than
> a request/response system (which I had trouble when I started
> considering usages of this).
In the next spec round, I will personally propose a internal pipe and
filter model for protocol abstracted servlets at the Servlet API JCP.
Our mail servlets were designed to be filters. Both you and Federico
fail to see its power: in case you _DON'T_ work on something, this is
passed thru.
Federico proposed a "clone" method. This is, for me, totally useless:
normal mail servlet behavior is "pass thru", the identity filter. So, if
you call response.getOutputStream() you are indicating you want to
modify the payload and the pass-thru is stopped, otherwise, you get it
for free (you don't have to do while() loops to copy the input on the
output, that's surely a stupid thing to require).
Mail servlets and HTTP Servlets have the exact same model but perform
differently:
1) http:
- default filter behavior: null filter
- reciepient: requestor (unspecified)
2) smtp:
- default filter behavior: identity filter
- reciepient: specified
other then this, the whole model is _exactly_ the same!!!!
> I *agree* it would be nice to support forking messages, but I never was
> happy with anything that supported this approach because then most of
> the time, it's a pain... do you have a Vector or array of response
> messages? I'm thinking the best way we can do this is to offer a
> convenient clone () method (either called directly on the Message object
> or through the message queue handler). You could clone the message,
> make whatever modifications to the new fork you want, and have it
> properly go into the message queue in an identical situation as the
> other. Reasonable?
Sounds like a much better approach to a vector of responses, that's for
sure.
The real question is: do we need something like this?
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
Come to the first official Apache Software Foundation Conference!
------------------------- http://ApacheCon.Com ---------------------
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]