You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Harter Damien <dh...@sopragroup.com> on 2010/10/20 14:07:32 UTC

Write large files

Hi to everyone.
I'm facing an OutOfMemory exception because the XML files I want to
write is too large, so I have to handle in memory too much XML objects
(generated from the XSD using XMLBeans 2.2.0). 
The use of Xms and Xmx parameters is a good workaround, but I'd like to
implement a stronger solution (in case of my file becomes larger !).
Is there a way to flush a part of XMLObjects into the XML file so that I
can free memory of marshalled objects and instanciate new ones ? Or
XMLBeans allows only "one-shot" operation ?
 
Thx a lot.
Damien.

Re: Write large files

Posted by Dave Shuck <ds...@gmail.com>.
I had this exact problem but got around it by using JRockit instead of the Sun JDK. As it was explained to me, JRockit disregards xmx settings. It essentially rendered my machine useless for about 45 minutes while it churned away but it did eventually finish. 

On Oct 20, 2010, at 7:07 AM, "Harter Damien" <dh...@sopragroup.com> wrote:

> Hi to everyone.
> I'm facing an OutOfMemory exception because the XML files I want to write is too large, so I have to handle in memory too much XML objects (generated from the XSD using XMLBeans 2.2.0).
> The use of Xms and Xmx parameters is a good workaround, but I'd like to implement a stronger solution (in case of my file becomes larger !).
> Is there a way to flush a part of XMLObjects into the XML file so that I can  free memory of marshalled objects and instanciate new ones ? Or XMLBeans allows only "one-shot" operation ?
>  
> Thx a lot.
> Damien.