Also, I have several questions concerning how James "holds" a
message while the mailets process. For instance, does James load
an entire message, including an attachment, while it decides if a
user even exists or does it simply read the the SMTP header?



Basically? Yes. James creates a Mail object which includes a MimeMessage object which does indeed include the whole message. This is then passed from mailet to mailet through the processors until it is finished with. The other way, to only load the headers, would require some advance knowledge about what matchers and mailets intend to do, which we can't get. I would wholeheartedly support a good resource optimised way of handling messages, but fear that that is probably not practical without compromising the general flexibility of James.



If it was important enough, one could always build a lazy-loading MimeMessageProxy.

Then you need to know in configuration which mailet uses what so that you could optimize flow.

You would need to consider whether content stays in memory once it has been loaded or if it should get released. In Java the rule used to be that you should have either short-lived objects or long-lived objects, not objects with medium life-span (longer than one gc-cycle), else garbage collection takes longer (if processor power is a short resource).

/tobe


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



Reply via email to