[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
manik at jboss.org
Mon Mar 12 15:07:47 EDT 2007
User: msurtani
Date: 07/03/12 15:07:47
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0
OptimisticNodeInterceptor.java
Log:
JBCACHE-1006
Revision Changes Path
No revision
No revision
1.21.2.10 +11 -1 JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticNodeInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java,v
retrieving revision 1.21.2.9
retrieving revision 1.21.2.10
diff -u -b -r1.21.2.9 -r1.21.2.10
--- OptimisticNodeInterceptor.java 7 Mar 2007 22:46:28 -0000 1.21.2.9
+++ OptimisticNodeInterceptor.java 12 Mar 2007 19:07:47 -0000 1.21.2.10
@@ -94,6 +94,11 @@
// "fail-more-silently" patch thanks to Owen Taylor - JBCACHE-767
if ((ctx.getOptionOverrides() == null || !ctx.getOptionOverrides().isFailSilently()) && MethodDeclarations.isOptimisticPutMethod(meth))
throw new CacheException("Unable to set node version for " + getFqn(args) + ", node is null.");
+ else
+ {
+ log.trace("Workspace node is null. Perhaps it has been deleted?");
+ return null;
+ }
}
switch (m.getMethodId())
@@ -217,7 +222,12 @@
// get a wrapped parent
WorkspaceNode parentNode = getOrCreateWorkspaceNode(parentFqn, workspace, false);
if (parentNode == null)
+ {
+ // chk if this has been removed in the same tx
+ parentNode = workspace.getNode(parentFqn);
+ if (parentNode == null || !parentNode.isDeleted())
throw new CacheException("Unable to find parent node with Fqn " + parentFqn);
+ }
parentNode.removeChild(workspaceNode.getName());
workspace.addNode(parentNode);
More information about the jboss-cvs-commits
mailing list