Noel J. Bergman schrieb:
Re: http://issues.apache.org/jira/browse/JAMES-512

This problem sounds related one we've previously documented, but not
finished fixing.  The file-based repositories maintain an in-memory list of
the e-mails, which grows forever unless you remove messages from it.

They hold references to the complete messages? It should be possible to make them only cache key2filename relation and load messages only on retrieve().

The in-memory message list is initialized when the repository is first
accessed during each server execution, and maintained in-memory for the
remainder of the server process.

My latest information by Stefano was that there should be only weak references to the MessageRepositories and they are gc'ed away after no one is accessing them anymore. IMHO James shouldn't hold a references to every MessageRepository even if it is not accessed. It has to be possible between list() and retrieve() operations to cache something.
Either the references have to be weak or explicitly removed.

Ideally, we can deprecate file-based repositories in favor of dbfile, unless
we have a need for purely file-based repositories.

I'm sure many people want to have their messages in files so they are able to access them with other tools. (e.g. for backup or move mailboxes or analyzing or direct reading) MBoxMailRepository and JavamailStoreMessageRepository cache at least the keys, and that also would be a waste of memory if they are never destroyed.

Joachim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to