Hello,
I know there were some big discussions about that problem before.
But I have not found any solution for my problem until now.
I’ve created a small and very simple web-service using WebObjects to
reproduce my problem (see below). I then calling this web-service from a small
application by invoking with axis every 200ms.
When looking to the used memory of my web-service it will grow
continuously over the time. After a while (maybe 30 min to 1h) I get a
java.lang.OutOfMemory: Heap overflow error.
I’ve tried a lot of things like revert, invalidateAllObjects,
dispose (where I get a java.lang.IllegalStateException).
Also increasing the max heap size for the JVM does not help. The
error appears only later.
I’ve used JProfiler to profile the web-service and found the most
(also increasing) memory usage in editingContext()._initWithParentObjectStore().
I’ve tried this example on a WindowsXP with WebObjects 5.2.4 as well
on a Apple XServe with WebObjects 5.3.
public class
MyService implements IMyService {
public
void storeToDB(String text1, String text2, String text3, String text4,
String text5) {
WOSession session = WOWebServiceUtilities.currentWOContext().session();
EOEditingContext ec = session.defaultEditingContext();
//ec.setUndoManager(null);
ec.undoManager().disableUndoRegistration();
MyLog myLog = new MyLog();
myLog.setCol1(text1);
myLog.setCol2(text2);
myLog.setCol3(text3);
myLog.setCol4(text4);
myLog.setCol5(text5);
ec.insertObject(myLog);
ec.saveChanges();
}
}
Any
ideas?
Ralf