* Register node with current transactor before calling onInit(), otherwise we
really prepare the ground for infinite recursion problems.
This commit is contained in:
parent
8e71110ad4
commit
aaa15f5670
1 changed files with 3 additions and 0 deletions
|
@ -168,6 +168,9 @@ public final class Node implements INode, Serializable {
|
||||||
public void invokeOnInit() {
|
public void invokeOnInit() {
|
||||||
// Invoke onInit() if it is defined by this Node's prototype
|
// Invoke onInit() if it is defined by this Node's prototype
|
||||||
if (dbmap != null) {
|
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 {
|
try {
|
||||||
// We need to reach deap into helma.framework.core to invoke onInit(),
|
// We need to reach deap into helma.framework.core to invoke onInit(),
|
||||||
// but the functionality is neat so we got to be strong here.
|
// but the functionality is neat so we got to be strong here.
|
||||||
|
|
Loading…
Add table
Reference in a new issue