Open oliviercailloux opened 8 years ago
I can see from your code that you are adding the 'mstor.cache.disabled' property to your javamail session properties. This will not work as you need to add it to your System properties. You can do this by adding an option at runtime (e.g. java -Dmstor.cache.disabled=true
System.setProperty("mstor.cache.disabled", "true");
regards, ben
Aaah ok. Thanks. I had not understood that when reading the doc. Perhaps you may consider making it work with the javamail session properties…
Thanks for the information in this issue. I had the same problem were i got EHCache serialization exceptions (other bug or usage problem) and could not deactivate the cache by the mailsession properties.
Using System properties to disable the cache solved this.
The scope of these configuration properties should not be system/vm wide, so the suggestion of @oliviercailloux is fine.
Thanks for your work, it has been very useful to me.
I have a question concerning the opening of a mbox file. I think mstor starts by reading the whole file, if so, would it be possible to change that behavior? When only needing to read a small part of the file, that waiting time seems not useful.
Perhaps relatedly, I suspect the cache does not get disabled, contrary to asked. I get plenty of debug log output
DEBUG net.fortuna.mstor.data.MboxFile - Found match at [115238873]
(or other numbers), thenDEBUG net.sf.ehcache.CacheManager - Attempting to create an existing singleton. Existing singleton returned.
I also easily getOutOfMemoryError
s even though I do not retain references to the messages I obtain. (I also seeINFO net.fortuna.mstor.util.Configurator - mstor.properties not found.
at start, which I suppose is expected.)Here is the code I use.
Here are other log statements printed while mstor initializes.