[jboss-dev-forums] [Design of JBossCache] - Re: NPE in InvalidationInterceptor.getNodeVersion()
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Feb 27 11:01:55 EST 2008
I've fixed this by returning null from getNodeVersion() if there is no WorkspaceNode for the Fqn. The effect of this is 'null' will be propagated to other nodes in the cluster as the version being invalidated. Looking at how they handle the invalidate() call, I see no problems with this -- they treat an invalidate() call with a null version as meaning "invalidate this Fqn no matter what version you have, but don't update the version".
Effect of this is, if an Fqn is associated with the optimistic tx, but there is no node w/ that Fqn in the workspace, we tell the cluster to invalidate that Fqn w/o updating the version. In a case where a tx calls cache.removeNode(Fqn.fromString("/locally-non-existent")) that seems to be the desired behavior. I don't see any other reason why an Fqn would be associated with a tx but no node would be in the workspace.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132556#4132556
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132556
More information about the jboss-dev-forums
mailing list