* Register node with current transactor before calling onInit(), otherwise we

really prepare the ground for infinite recursion problems.
This commit is contained in:
hns 2006-11-30 21:50:46 +00:00
parent 8e71110ad4
commit aaa15f5670

View file

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