Joachim Draeger wrote:
Hi!
1. Why MailRepository gets configured on startup?
Every MAIL repository used by ToRepository and FromRepository mailets,
the SPOOL repository used by RemoteDelivery and the main SPOOL
repository used by the JamesSpoolManager (localspoolrepository) are
created/configured when the components are initialized.
It is configured with the values from config.xml and initialize is
called. How can I determine that I shouldn't auto create Mailbox right now?
On demand it gets configured by James every time needed:
DefaultConfiguration mboxConf
= new DefaultConfiguration("repository",
"generated:AvalonFileRepository.compose()");
mboxConf.setAttribute("destinationURL", destination);
mboxConf.setAttribute("type", "MAIL");
Mailboxes are created on demand and cached.
2. What is the life cycle of a MailRepository?
I noticed that it was only initialized once it was first called. But
maybe i interpreted the logs wrong. Does the server keep an
MailRepository object for each user in memory until it stops?
There is a weak cache: James tries to keep the mbox references in
memory, but if no one has reference it may gc them.
3. How long are the message keys (names) valid?
Does it fulfill the contract completely to cache keys for the lifetime
of the MailRepository object?
Joachim
James expect to store mails under a given key and to be able to retrieve
the same mail using the same key. There is no "persistence" of key as
references so it's safe to change keys between restarts.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]