Some good questions.

> If a database is used as a repository this problem is only prolonged,
cause
> storing or retrieving mails to or from the the database currently loads
the
> entire Mail into a ByteArrayStream.

> Actually im wondering why JDBCMailRepository.store(MailImpl mc) isnt using
> the InputStream of MimeMessageInputStreamSource

There is no question that the James code surrounding MimeMessage, including
MimMessageWrapper and the repositories can be significantly improved.  Feel
free to submit patches.  Please test first.

> JDBCMailRepository.retrieve(String key) loads the Mail with
> ResultSet.getBytes(1) in MimeMessageJDBCSource instead of
> ResultSet.getBinaryStream(1).

To leave it as a stream would requiring leaving the JDBC connection live
until the stream would be closed.  I don't disagree with the possibility,
but we do need to make sure that we are well behaved with respect to the
database server.

The dbfile protocol gets around all of this by storing the Mail instance and
message headers in the database, and the message body in the file system.

        --- Noel


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

Reply via email to