[jboss-svn-commits] JBL Code SVN: r24471 - in labs/jbossrules/trunk/drools-core/src/main/java/org/drools: time/impl and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Dec 22 20:29:50 EST 2008
Author: tirelli
Date: 2008-12-22 20:29:50 -0500 (Mon, 22 Dec 2008)
New Revision: 24471
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemory.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/time/impl/PointInTimeTrigger.java
Log:
JBRULES-1902: fixing bug on the trigger that was causing the engine garbage collection to slow down to death
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java 2008-12-23 01:04:27 UTC (rev 24470)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java 2008-12-23 01:29:50 UTC (rev 24471)
@@ -195,7 +195,7 @@
((EventFactHandle)factHandle).getStartTimestamp() + this.expirationOffset );
JobContext jobctx = new ExpireJobContext( expire,
workingMemory );
- JobHandle handle = clock.scheduleJob( job,
+ JobHandle handle = clock.scheduleJob( new ExpireJob(),
jobctx,
new PointInTimeTrigger( nextTimestamp ) );
jobctx.setJobHandle( handle );
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemory.java 2008-12-23 01:04:27 UTC (rev 24470)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooWorkingMemory.java 2008-12-23 01:29:50 UTC (rev 24471)
@@ -316,7 +316,6 @@
}
public void execute(InternalWorkingMemory workingMemory) {
-
final PropagationContext context = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
PropagationContext.EXPIRATION,
null,
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/time/impl/PointInTimeTrigger.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/time/impl/PointInTimeTrigger.java 2008-12-23 01:04:27 UTC (rev 24470)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/time/impl/PointInTimeTrigger.java 2008-12-23 01:29:50 UTC (rev 24471)
@@ -36,7 +36,12 @@
}
public Date getNextFireTime() {
- return this.timestamp;
+ if( timestamp != null) {
+ Date next = timestamp;
+ this.timestamp = null;
+ return next;
+ }
+ return null;
}
public void readExternal(ObjectInput in) throws IOException,
More information about the jboss-svn-commits
mailing list