By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Attachments & Performance

P: n/a
Hi all,

My question is quite simple. Its 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.

Oct 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I apologize...

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


Oct 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.