james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Questions on the Mail and MailRepository interfaces
Date Tue, 15 May 2007 08:37:09 GMT
Hi,

On 5/15/07, Danny Angus <danny@apache.org> wrote:
> On 5/15/07, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> > Is the repository implementation required to keep the original key
> > (from mail.getName()) when stroring a new message, or can it replace
> > it with an internal identifier?
>
> Good question, In practice all our current implementations do.
> The benefit is that it is possible to trace a message name in the
> logs, however there is nothing (AFAIK) in the functionality which
> depends upon the name staying the same. Each cycle of activity on a
> Mail object begins with getting the name (or list of names) from the
> repository, and any Store should (but may not) mark the end of a
> cycle.
>
> I guess you have to weigh up the cost of developing the code to keep
> the name against the risk of name changes breaking something.

JCR assigns an internally generated UUID to all "referenceable" nodes.
This would be a perfect message key for a JCR based mail repository,
since it is guaranteed to be unique within a workspace, it enables
very efficient message lookups, and it allows all sorts of other nice
things like hard references,  etc.

BR,

Jukka Zitting

---------------------------------------------------------------------
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