diff --git a/src/helma/framework/core/ESUser.java b/src/helma/framework/core/ESUser.java index b1990b35..1d9b72f7 100644 --- a/src/helma/framework/core/ESUser.java +++ b/src/helma/framework/core/ESUser.java @@ -61,6 +61,15 @@ public class ESUser extends ESNode { cacheWrapper = new ESNode (cache, eval); } + public void setNode (INode node) { + if (node != null) { + this.node = node; + eval.objectcache.put (node, this); + // we don't take over the transient cache from the node, + // because we always use the one from the user object. + } + } + public String toString () { return ("UserNode "+node.getNameOrID ()); diff --git a/src/helma/objectmodel/INode.java b/src/helma/objectmodel/INode.java index 9505339e..2335ffb4 100644 --- a/src/helma/objectmodel/INode.java +++ b/src/helma/objectmodel/INode.java @@ -47,7 +47,6 @@ public interface INode { public String getPrototype (); public void setPrototype (String prototype); public INode getCacheNode (); - public void setCacheNode (INode cache); /** * node-related methods diff --git a/src/helma/objectmodel/Node.java b/src/helma/objectmodel/Node.java index 7e0ad354..9e41192d 100644 --- a/src/helma/objectmodel/Node.java +++ b/src/helma/objectmodel/Node.java @@ -768,10 +768,6 @@ public class Node implements INode, Serializable { return cacheNode; } - public synchronized void setCacheNode (INode cache) { - this.cacheNode = cache; - } - } diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index 2bb263d9..d999f54a 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -1691,10 +1691,6 @@ public class Node implements INode, Serializable { return cacheNode; } - public synchronized void setCacheNode (INode cache) { - this.cacheNode = cache; - } - // walk down node path to the first non-virtual node and return its id. // limit max depth to 3, since there shouldn't be more then 2 layers of virtual nodes. public String getNonVirtualHomeID () {