On 5/15/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
Stefano Bagnara ha scritto:
> Jukka Zitting ha scritto:
>> I'd be interested in pursuing an approach where the full message is
>> never exists outside the repository, i.e. the message is streamed
>> directly into the repository during an SMTP DATA command (or the
>> equivalent in other protocols) and only the message key returned by
>> the repository is used to keep track of the message.
>
> MimeMessageSource is there for this precise task.
>
> Look at implementations of that interface.
>
> You create a MimeMessageWrapper (extends MimeMessage) initializing it
> with a MimeMessageSource (you will have to create a JCRMimeMessageSource).
>
> Stefano
I probably should add that MimeMessageCopyOnWriteProxy and
MimeMessageWrapper are there to optimize the usage of MimeMessages in
the JAMES Server processing. The copy on write proxy simply share a
mimemessagesource between multiple copies unless it is changed and the
wrapper is able to avoid loading the body if it is not needed.
i've come to the conclusion that MimeMessage really isn't suitable for
use in a protocol like IMAP. IMHO a different server side mail
abstraction is needed.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]