[jboss-svn-commits] JBL Code SVN: r19524 - 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 08:27:13 EDT 2008
Author: mark.proctor at jboss.com
Date: 2008-04-11 08:27:12 -0400 (Fri, 11 Apr 2008)
New Revision: 19524
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
-Preserve equalitykey status
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 12:06:44 UTC (rev 19523)
+++ labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2008-04-11 12:27:12 UTC (rev 19524)
@@ -1101,11 +1101,6 @@
this.lock.lock();
this.ruleBase.executeQueuedActions();
- // only needed if we maintain tms, but either way we must get it before we do the retract
- int status = -1;
- if ( this.maintainTms ) {
- status = ((InternalFactHandle) factHandle).getEqualityKey().getStatus();
- }
final InternalFactHandle handle = (InternalFactHandle) factHandle;
//final Object originalObject = (handle.isShadowFact()) ? ((ShadowProxy) handle.getObject()).getShadowedObject() : handle.getObject();
@@ -1167,13 +1162,13 @@
final Object originalObject = (handle.isShadowFact()) ? ((ShadowProxy) handle.getObject()).getShadowedObject() : handle.getObject();
if ( this.maintainTms ) {
- EqualityKey key = handle.getEqualityKey();
+ int status = handle.getEqualityKey().getStatus();
// now use an existing EqualityKey, if it exists, else create a new one
- key = this.tms.get( object );
+ EqualityKey key = this.tms.get( object );
if ( key == null ) {
key = new EqualityKey( handle,
- 0 );
+ status );
this.tms.put( key );
} else {
key.addFactHandle( handle );
More information about the jboss-svn-commits
mailing list