Hi Stefano,
I have tried
ByteArrayInputStream headersIn = new
SharedByteArrayInputStream(headers.toByteArray());
but it still runs out of heap.
I used
-Xms512M -Xmx768M
but it made my system sluggish with swapping memory-file.
Is it possible to store it into temporary file? Using more memory does not
guarantee the stability, unless the email size is limited. But this is not
practical since it reduces James scalability. In a very busy server where
there many (~ 100 users at any time at peak), it can make the heap exhausted
very fast.
Thanks.
Regards,
Edward
On 12/30/05, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
>
> Edward Tan wrote:
> > Yes!
> >
> > } catch(Throwable t) {
> > System.out.println(t.getMessage());
> > t.printStackTrace();
> >
> > ====>
> >
> > Java heap space
> > java.lang.OutOfMemoryError: Java heap space
>
> The only solution is to increase the memory available to java (-Xmx500M
> for example)
>
> Otherwise you could try the com.sun.mail.util.SharedByteArrayInputStream
> way to see if javamail will require less memory. If you try this way and
> it works please tell us so we can decide wether to include it in our
> codebase or not.
>
> Stefano
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>