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" <dhar...@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.