You may also try to reduce the "Max Number of Objects" for the DataDomain from the default 10000 to something smaller.

Also are you setting "-Xmx" to something small? You may want to start with the higher values, if only to be able to see the effect of various memory saving strategies before the app crashes.

Andrus


On May 14, 2007, at 10:39 PM, Tomi N/A wrote:

2007/5/14, Andrus Adamchik <[EMAIL PROTECTED]>:

On May 14, 2007, at 8:57 PM, Tomi N/A wrote:

> mca = (MyClassA)
> Util.getCommonContext().objectFromDataRow(SpisUtil.class, dr, false);

This is the source of the memory leak. You may want to replace the
context after processing an X number of rows.

No effect, captain.
I replaced
Util.getCommonContext().objectFromDataRow(SpisUtil.class, dr, false);
with
   Util.getNewContext().objectFromDataRow(SpisUtil.class, dr, false)
where getNewContext() does
return Configuration.getSharedConfiguration().getDomain ().createDataContext();

I understand I wouldn't want to create a new DataContext for *every*
DataObject, but I had hoped it would be proof of concept.

Any other ideas, comments, hints as to why the above approach didn't work?

Cheers,
t.n.a.


Reply via email to