james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: StreamBased DataSource instead of byte[] ?
Date Wed, 02 Jun 2004 03:28:17 GMT
> we want to be able to send and receive emails with very large multipart
> mime (400 Meg or larger) email messages (Customer requirements).

> 1. will James have problem handling that large of a message?

You will need to expand the heap and adjust some other settings, at least
for now.  You should also use either file or preferably dbfile for the
protocol.  There are several things in James that cause the message body to
be loaded into memory.  We have plans to address that in the next major
release.

Actually, we should be able to significantly reduce the footprint, at least
in some cases, by hacking around with javax.mail.internet.SharedInputStream.
In most cases, JavaMail clones the message content, but if it detects that
the content stream is one of its internal shared streams, it doesn't.

> 2. is there a stream-based data source implementation ?

DataSource *is* stream-based.  I am not aware of some generic wrapper for
using an arbitrary InputStream and OutputStream.  Mind you, JavaMail is
really picky.  In order to avoid cloning content, we'll need to fabricate a
stream that is both an instance of BufferedInputStream and
SharedInputStream, or JavaMail will still clone the contents.

FYI, we have some new code that will appear to the next major release of
James that should help us adopt a more purely stream-oriented approach for
uses where JavaMail is not necessary.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Mime
View raw message