From aaa15f5670d5038d78313e6a47c7c5f014052b4c Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 30 Nov 2006 21:50:46 +0000 Subject: [PATCH] * Register node with current transactor before calling onInit(), otherwise we really prepare the ground for infinite recursion problems. --- src/helma/objectmodel/db/Node.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index 3cd71f49..04aa2133 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -168,6 +168,9 @@ public final class Node implements INode, Serializable { public void invokeOnInit() { // Invoke onInit() if it is defined by this Node's prototype if (dbmap != null) { + // register node with local thread, or else we risk infinite recursion in onInit() + if (Thread.currentThread() instanceof Transactor) + ((Transactor) Thread.currentThread()).visitCleanNode(this); try { // We need to reach deap into helma.framework.core to invoke onInit(), // but the functionality is neat so we got to be strong here.