james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bagnara <apa...@bago.org>
Subject Re: Questions on the Mail and MailRepository interfaces
Date Tue, 15 May 2007 16:01:22 GMT
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.

Maybe reading the AvalonMailRepository source code will help you
understanding how this is managed for file based mail repositories.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message