[jboss-svn-commits] JBL Code SVN: r19520 - labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Apr 11 07:56:29 EDT 2008
Author: mark.proctor at jboss.com
Date: 2008-04-11 07:56:28 -0400 (Fri, 11 Apr 2008)
New Revision: 19520
Modified:
labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
Log:
JBRULES-1556 Modify is not normalising activations, which is impacting lock-on-active
-PropagationContexts for modify now go in a temporary map, so that modifyRetract and modifyInsert use the same PropagationContext.
Modified: labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
===================================================================
--- labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2008-04-11 10:29:11 UTC (rev 19519)
+++ labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2008-04-11 11:56:28 UTC (rev 19520)
@@ -1085,6 +1085,8 @@
this.identityMap.remove( handle );
}
}
+
+ private Map modifyContexts = new HashMap();
public void modifyRetract(final FactHandle factHandle) {
modifyRetract( factHandle,
@@ -1123,6 +1125,9 @@
activation,
this.agenda.getActiveActivations(),
this.agenda.getDormantActivations() );
+
+ modifyContexts.put( handle, propagationContext );
+
doRetract( handle,
propagationContext );
@@ -1184,12 +1189,7 @@
activation.getPropagationContext().releaseResources();
}
// Nowretract any trace of the original fact
- final PropagationContext propagationContext = new PropagationContextImpl( this.propagationIdCounter++,
- PropagationContext.MODIFICATION,
- rule,
- activation,
- this.agenda.getActiveActivations(),
- this.agenda.getDormantActivations() );
+ final PropagationContext propagationContext = ( PropagationContext ) this.modifyContexts.remove( handle );
doInsert( handle,
object,
More information about the jboss-svn-commits
mailing list