* Mark node clean in init() before invoking onInit() so we have a chance to

modify the node in onInit() and having the changes written back to db.
This commit is contained in:
hns 2006-01-12 16:47:04 +00:00
parent 4b72017330
commit 4c50f96e3e

View file

@ -160,6 +160,10 @@ public final class Node implements INode, Serializable {
// set lastmodified and created timestamps and mark as clean
created = lastmodified = System.currentTimeMillis();
if (state != CLEAN) {
markAs(CLEAN);
}
// Invoke onInit() if it is defined by this Node's prototype
if (dbm != null) {
try {
@ -173,10 +177,6 @@ public final class Node implements INode, Serializable {
nmgr.nmgr.app.logError("Error invoking onInit()", x);
}
}
if (state != CLEAN) {
markAs(CLEAN);
}
}
/**