Attachments & Performance

J

JulioHM

Hi all,

My question is quite simple. It´s about JavaMail API 1.3 and how it
handles file attachments. I've been googling around, but without luck.

Well, question is: How exactly does it handle attachments?

Consider a MultipartMessage with a 50MB attachment file. As I create
the message and pass the file's InputStream to it, does it load all of
the binary data into memory? Or is the InputStream accessed only when
the message is actually sent?

We are trying to implement a front-end server which will be acessed by
various client applications. Since the client doesn't need to speak
IMAP, our front-end will do the talking for it, exposing some servlets
to get the email messages through.

We are handling all requests via Java Servlets. The messsages are
created within the servlets as soon as they need to be sent. When the
client posts a binary file to be attached to the message we add this
file as an attachment. Our real concertn regards to the size of
attachments and how the are handled by JavaMail API. If all of the
binary data is kept into memory until the message is sent, we'll have
serious performance problems, thus we would have to start thinking of a
different approach.

So if anyone knows how JavaMail API actually works internally,
appreciate the help.

Thanks in advance.
 
J

JulioHM

I apologize...

I just realized that I posted this message on a JavaScript group... not
Java..

Derrr.
Sorry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top