[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Mon Dec 11 09:46:54 EST 2006
User: msurtani
Date: 06/12/11 09:46:54
Modified: src/org/jboss/cache/interceptors Tag:
Branch_JBossCache_1_4_0
OptimisticValidatorInterceptor.java
OptimisticCreateIfNotExistsInterceptor.java
Log:
Fixed weird bugs
Revision Changes Path
No revision
No revision
1.25.2.10 +1 -1 JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticValidatorInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java,v
retrieving revision 1.25.2.9
retrieving revision 1.25.2.10
diff -u -b -r1.25.2.9 -r1.25.2.10
--- OptimisticValidatorInterceptor.java 10 Dec 2006 17:02:38 -0000 1.25.2.9
+++ OptimisticValidatorInterceptor.java 11 Dec 2006 14:46:54 -0000 1.25.2.10
@@ -216,7 +216,7 @@
if (log.isTraceEnabled()) log.trace("inserting merged data " + wrappedNode.getMergedData());
Map mergedData = wrappedNode.getMergedData();
current.put(mergedData, true);
- if (workspace.isVersioningImplicit())
+ if (workspace.isVersioningImplicit() || wrappedNode.getVersion() instanceof DefaultDataVersion)
{
current.setVersion(((DefaultDataVersion)wrappedNode.getVersion()).increment());
}
1.21.2.2 +11 -11 JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticCreateIfNotExistsInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticCreateIfNotExistsInterceptor.java,v
retrieving revision 1.21.2.1
retrieving revision 1.21.2.2
diff -u -b -r1.21.2.1 -r1.21.2.2
--- OptimisticCreateIfNotExistsInterceptor.java 11 Nov 2006 17:50:03 -0000 1.21.2.1
+++ OptimisticCreateIfNotExistsInterceptor.java 11 Dec 2006 14:46:54 -0000 1.21.2.2
@@ -147,26 +147,26 @@
// current workspace node canot be null.
// try and get the child of current node
- log.debug(" Entering synchronized nodewrapper access for gtx " + gtx);
- TreeNode tempchildNode = workspaceNode.getChild(childName);
+ if (log.isTraceEnabled()) log.trace(" Entering synchronized nodewrapper access for gtx " + gtx);
+ TreeNode tempChildNode = workspaceNode.getChild(childName);
// if (log.isDebugEnabled()) log.debug(" Entered synchronized workspaceNode " + workspaceNode + " access for gtx " + gtx);
// no child exists with this name
- if (tempchildNode == null)
+ if (tempChildNode == null)
{
- if (log.isDebugEnabled()) log.debug("Child node "+childName+" doesn't exist. Creating new node.");
+ if (log.isTraceEnabled()) log.trace("Child node "+childName+" doesn't exist. Creating new node.");
// we put the parent node into the workspace as we are changing it's children
WorkspaceNode tempCheckWrapper = workspace.getNode(workspaceNode.getFqn());
if (tempCheckWrapper == null || tempCheckWrapper.isDeleted())
{
//add a new one or overwrite an existing one that has been deleted
- if (log.isDebugEnabled()) log.debug("Parent node doesn't exist in workspace or has been deleted. Adding to workspace in gtx " + gtx);
+ if (log.isTraceEnabled()) log.trace("Parent node "+workspaceNode.getFqn()+" doesn't exist in workspace or has been deleted. Adding to workspace in gtx " + gtx);
workspace.addNode(workspaceNode);
}
else
{
- if (log.isDebugEnabled()) log.debug(" Parent node " + workspaceNode.getFqn() + " exists in workspace " + gtx);
+ if (log.isTraceEnabled()) log.trace(" Parent node " + workspaceNode.getFqn() + " exists in workspace " + gtx);
}
copy = (Fqn) tmpFqn.clone();
// this does not add it into the real child nodes - but in its
@@ -194,17 +194,17 @@
else
{
// node does exist but might not be in the workspace
- childWorkspaceNode = workspace.getNode(tempchildNode.getFqn());
+ childWorkspaceNode = workspace.getNode(tempChildNode.getFqn());
// wrap it up so we can put it in later if we need to
if (childWorkspaceNode == null || childWorkspaceNode.isDeleted())
{
- if (log.isDebugEnabled()) log.debug("Child node doesn't exist in workspace or has been deleted. Adding to workspace in gtx " + gtx);
- childWorkspaceNode = NodeFactory.getInstance().createWorkspaceNode(tempchildNode, workspace);
- if (!workspace.isVersioningImplicit()) childWorkspaceNode.setVersion(version);
+ if (log.isDebugEnabled()) log.debug("Child node "+tempChildNode.getFqn()+" doesn't exist in workspace or has been deleted. Adding to workspace in gtx " + gtx);
+ childWorkspaceNode = NodeFactory.getInstance().createWorkspaceNode(tempChildNode, workspace);
+ if (isTargetFqn && !workspace.isVersioningImplicit()) childWorkspaceNode.setVersion(version);
}
else
{
- if (log.isDebugEnabled()) log.debug(" Already found " + tempchildNode.getFqn() + " node in workspace " + gtx);
+ if (log.isDebugEnabled()) log.debug(" Already found " + tempChildNode.getFqn() + " node in workspace " + gtx);
}
}
More information about the jboss-cvs-commits
mailing list