Author: mar...@jb...
Date: 2006-06-06 05:59:25 -0400 (Tue, 06 Jun 2006)
New Revision: 4638
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Serializable.drl
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBase.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/WorkingMemory.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractRuleBase.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooRuleBase.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/TerminalNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaLeftMemory.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaRightMemory.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedList.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedListNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java
Log:
JBRULES-285 WorkingMemory is not seriaziable
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -45,6 +45,7 @@
import org.drools.State;
import org.drools.TestParam;
import org.drools.WorkingMemory;
+import org.drools.common.ObjectInputStreamWithLoader;
import org.drools.compiler.DrlParser;
import org.drools.compiler.DroolsError;
import org.drools.compiler.DroolsParserException;
@@ -63,6 +64,7 @@
import org.drools.rule.Rule;
import org.drools.spi.ActivationGroup;
import org.drools.spi.AgendaGroup;
+import org.drools.util.PrimitiveLongMap;
/**
* This contains the test cases for each engines implementation to execute.
@@ -1687,6 +1689,12 @@
}
public void testSerializable() throws Exception {
+// PrimitiveLongMap longMap = new PrimitiveLongMap(8, 32);
+//
+// final byte[] map = serializeOut( longMap );
+// longMap = (PrimitiveLongMap) serializeIn( map );
+
+
final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "test_Serializable.drl" ) );
final PackageBuilder builder = new PackageBuilder();
@@ -1703,7 +1711,7 @@
final byte[] ast = serializeOut( ruleBase );
ruleBase = (RuleBase) serializeIn( ast );
final Rule[] rules = ruleBase.getPackages()[0].getRules();
- assertEquals( 3,
+ assertEquals( 4,
rules.length );
assertEquals( "match Person 1",
@@ -1712,6 +1720,35 @@
rules[1].getName() );
assertEquals( "match Person 3",
rules[2].getName() );
+ assertEquals( "match Integer",
+ rules[3].getName() );
+
+ WorkingMemory workingMemory = ruleBase.newWorkingMemory();
+
+ workingMemory.setGlobal( "list", new ArrayList() );
+
+ workingMemory.assertObject( new Integer(5) );
+
+ final byte[] wm = serializeOut( workingMemory );
+
+ workingMemory = ruleBase.newWorkingMemory( new ByteArrayInputStream( wm ) );
+
+ assertEquals( 1, workingMemory.getObjects().size() );
+ assertEquals( new Integer( 5 ) , workingMemory.getObjects().get(0) );
+
+ assertEquals( 1, workingMemory.getAgenda().agendaSize() );
+
+ workingMemory.fireAllRules();
+
+ List list = ( List ) workingMemory.getGlobal( "list" );
+
+ assertEquals( 1, list.size() );
+ assertEquals( new Integer( 4 ), list.get( 0 ) );
+
+ assertEquals( 2, workingMemory.getObjects().size() );
+ assertEquals( new Integer( 5 ) , workingMemory.getObjects().get(0) );
+ assertEquals( "help" , workingMemory.getObjects().get(1) );
+
}
public void testLogicalAssertions() throws Exception {
Modified: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Serializable.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Serializable.drl 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Serializable.drl 2006-06-06 09:59:25 UTC (rev 4638)
@@ -35,3 +35,14 @@
exists Person( name == "mark" )
then
end
+
+
+rule "match Integer"
+ agenda-group "yyy"
+ auto-focus true
+ when
+ Integer()
+ then
+ assertLogical ( new String( "help" ) );
+ list.add( new Integer( 4 ) );
+end
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBase.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBase.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBase.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import java.io.IOException;
+import java.io.InputStream;
import java.io.Serializable;
import java.util.Set;
@@ -46,7 +48,8 @@
/**
* Create a new <code>WorkingMemory</code> session for this
- * <code>RuleBase</code>.
+ * <code>RuleBase</code>. By default the RuleBase retains a
+ * weak reference to returned WorkingMemory.
*
* <p>
* The created <code>WorkingMemory</code> uses the default conflict
@@ -60,8 +63,60 @@
*/
WorkingMemory newWorkingMemory();
+ /**
+ * Create a new <code>WorkingMemory</code> session for this
+ * <code>RuleBase</code>. Optionally the RuleBase retains a
+ * weak reference to returned WorkingMemory.
+ *
+ * <p>
+ * The created <code>WorkingMemory</code> uses the default conflict
+ * resolution strategy.
+ * </p>
+ *
+ * @see WorkingMemory
+ * @see org.drools.conflict.DefaultConflictResolver
+ *
+ * @return A newly initialized <code>WorkingMemory</code>.
+ */
WorkingMemory newWorkingMemory(boolean keepReference);
+ /**
+ * RuleBases handle the returning of a Serialized WorkingMemory
+ * pass as an InputStream. If the reference is a byte[] then
+ * wrap with new ByteArrayInputStream. By default the RuleBase retains a
+ * weak reference to returned WorkingMemory.
+ *
+ * <p>
+ * The created <code>WorkingMemory</code> uses the default conflict
+ * resolution strategy.
+ * </p>
+ *
+ * @see WorkingMemory
+ * @see org.drools.conflict.DefaultConflictResolver
+ *
+ * @return A serialised initialized <code>WorkingMemory</code>.
+ */
+ WorkingMemory newWorkingMemory(InputStream stream) throws IOException, ClassNotFoundException;
+
+ /**
+ * RuleBases handle the returning of a Serialized WorkingMemory
+ * pass as an InputStream. If the reference is a byte[] then
+ * wrap with new ByteArrayInputStream. Optionally the RuleBase retains a
+ * weak reference to returned WorkingMemory.
+ *
+ * <p>
+ * The created <code>WorkingMemory</code> uses the default conflict
+ * resolution strategy.
+ * </p>
+ *
+ * @see WorkingMemory
+ * @see org.drools.conflict.DefaultConflictResolver
+ *
+ * @return A serialised initialized <code>WorkingMemory</code>.
+ */
+ WorkingMemory newWorkingMemory(InputStream stream, boolean keepReference ) throws IOException, ClassNotFoundException;
+
+
Package[] getPackages();
void addPackage(Package pkg) throws Exception;
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/WorkingMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/WorkingMemory.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/WorkingMemory.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -29,6 +29,10 @@
/**
* A knowledge session for a <code>RuleBase</code>.
*
+ * While this object can be serialised out, it cannot be serialised in. This is because
+ * the RuleBase reference is transient. Please see the RuleBase interface for serializing
+ * in WorkingMemories from an InputStream.
+ *
* @author <a href="mailto:bo...@en...">bob mcwhirter </a>
*/
public interface WorkingMemory
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractRuleBase.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractRuleBase.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractRuleBase.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -20,6 +20,7 @@
import java.io.ByteArrayOutputStream;
import java.io.Externalizable;
import java.io.IOException;
+import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
@@ -386,4 +387,21 @@
public RuleBaseConfiguration getConfiguration() {
return this.config;
}
+
+ public WorkingMemory newWorkingMemory(InputStream stream) throws IOException, ClassNotFoundException {
+ return newWorkingMemory( stream,
+ true );
+ }
+ public WorkingMemory newWorkingMemory(InputStream stream,
+ boolean keepReference ) throws IOException, ClassNotFoundException {
+
+ final ObjectInputStreamWithLoader streamWithLoader = new ObjectInputStreamWithLoader( stream,
+ this.packageClassLoader );
+
+ AbstractWorkingMemory workingMemory = ( AbstractWorkingMemory ) streamWithLoader.readObject();
+ workingMemory.setRuleBase( this );
+
+ return workingMemory;
+
+ }
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -81,6 +81,7 @@
/** The actual memory for the <code>JoinNode</code>s. */
protected final PrimitiveLongMap nodeMemories = new PrimitiveLongMap( 32,
8 );
+
/** Global values which are associated with this memory. */
protected final Map globals = new HashMap();
@@ -91,17 +92,18 @@
/** The eventSupport */
protected final WorkingMemoryEventSupport workingMemoryEventSupport = new WorkingMemoryEventSupport( this );
+
protected final AgendaEventSupport agendaEventSupport = new AgendaEventSupport( this );
/** The <code>RuleBase</code> with which this memory is associated. */
- protected final InternalRuleBase ruleBase;
+ protected transient InternalRuleBase ruleBase;
protected final FactHandleFactory handleFactory;
protected final TruthMaintenanceSystem tms;
/** Rule-firing agenda. */
- protected DefaultAgenda agenda;
+ protected DefaultAgenda agenda;
protected final List factQueue = new ArrayList();
@@ -150,6 +152,10 @@
// Instance methods
// ------------------------------------------------------------
+ void setRuleBase(InternalRuleBase ruleBase) {
+ this.ruleBase = ruleBase;
+ }
+
public void addEventListener(final WorkingMemoryEventListener listener) {
this.workingMemoryEventSupport.addEventListener( listener );
}
@@ -190,7 +196,7 @@
*/
public void setGlobal(final String name,
final Object value) {
- // Make sure the global has been declared in the RuleBase
+ // Make sure the global has been declared in the RuleBase
final Map globalDefintions = this.ruleBase.getGlobals();
final Class type = (Class) globalDefintions.get( name );
if ( (type == null) ) {
@@ -282,12 +288,12 @@
*
*/
public Object getObject(final FactHandle handle) {
- // you must always take the value from the assertMap, incase the handle
- // is not from this WorkingMemory
+ // you must always take the value from the assertMap, incase the handle
+ // is not from this WorkingMemory
InternalFactHandle factHandle = (InternalFactHandle) this.assertMap.get( handle );
if ( factHandle != null ) {
return factHandle.getObject();
- }
+ }
return null;
@@ -307,9 +313,9 @@
}
/**
- * A helper method used to avoid lookups when iterating over facthandles and
- * objects at once.
- * DO NOT MAKE THIS METHOD PUBLIC UNLESS YOU KNOW WHAT YOU ARE DOING
+ * A helper method used to avoid lookups when iterating over facthandles and
+ * objects at once. DO NOT MAKE THIS METHOD PUBLIC UNLESS YOU KNOW WHAT YOU
+ * ARE DOING
*
* @return
*/
@@ -407,7 +413,7 @@
final Rule rule,
final Activation activation) throws FactException {
if ( object == null ) {
- // you cannot assert a null object
+ // you cannot assert a null object
return null;
}
InternalFactHandle handle = null;
@@ -422,20 +428,23 @@
// lets see if the object is already logical asserted
key = this.tms.get( object );
} else {
- // Object is already asserted, so check and possibly correct its status and then return the handle
+ // Object is already asserted, so check and possibly correct its
+ // status and then return the handle
key = handle.getEqualityKey();
if ( key.getStatus() == EqualityKey.STATED ) {
- // return null as you cannot justify a stated object.
+ // return null as you cannot justify a stated object.
return handle;
}
if ( !logical ) {
- // this object was previously justified, so we have to override it to stated
+ // this object was previously justified, so we have to
+ // override it to stated
key.setStatus( EqualityKey.STATED );
this.tms.removeLogicalDependencies( handle );
} else {
- // this was object is already justified, so just add new logical dependency
+ // this was object is already justified, so just add new
+ // logical dependency
this.tms.addLogicalDependency( handle,
activation,
activation.getPropagationContext(),
@@ -447,7 +456,8 @@
// At this point we know the handle is null
if ( key == null ) {
- // key is also null, so treat as a totally new stated/logical assert
+ // key is also null, so treat as a totally new stated/logical
+ // assert
handle = this.handleFactory.newFactHandle( object );
this.assertMap.put( handle,
handle );
@@ -465,12 +475,14 @@
}
} else if ( !logical ) {
if ( key.getStatus() == EqualityKey.JUSTIFIED ) {
- // Its previous justified, so switch to stated and remove logical dependencies
+ // Its previous justified, so switch to stated and remove
+ // logical dependencies
final InternalFactHandle justifiedHandle = key.getFactHandle();
this.tms.removeLogicalDependencies( justifiedHandle );
if ( this.discardOnLogicalOverride ) {
- // override, setting to new instance, and return existing handle
+ // override, setting to new instance, and return
+ // existing handle
key.setStatus( EqualityKey.STATED );
handle = key.getFactHandle();
handle.setObject( object );
@@ -495,14 +507,16 @@
} else {
if ( key.getStatus() == EqualityKey.JUSTIFIED ) {
- // only add as logical dependency if this wasn't previously stated
+ // only add as logical dependency if this wasn't previously
+ // stated
this.tms.addLogicalDependency( key.getFactHandle(),
activation,
activation.getPropagationContext(),
rule );
return key.getFactHandle();
} else {
- // You cannot justify a previously stated equality equal object, so return null
+ // You cannot justify a previously stated equality equal
+ // object, so return null
return null;
}
}
@@ -516,10 +530,10 @@
rule,
activation );
- // this.ruleBase.assertObject( handle,
- // object,
- // propagationContext,
- // this );
+ // this.ruleBase.assertObject( handle,
+ // object,
+ // propagationContext,
+ // this );
doAssertObject( handle,
object,
@@ -594,29 +608,29 @@
}
}
- // /**
- // * Associate an object with its handle.
- // *
- // * @param handle
- // * The handle.
- // * @param object
- // * The object.
- // */
- // public void putObject(InternalFactHandle handle,
- // Object object) {
- // this.assertMap.put( object,
- // handle );
+ // /**
+ // * Associate an object with its handle.
+ // *
+ // * @param handle
+ // * The handle.
+ // * @param object
+ // * The object.
+ // */
+ // public void putObject(InternalFactHandle handle,
+ // Object object) {
+ // this.assertMap.put( object,
+ // handle );
//
- // handle.setObject( object );
- // }
+ // handle.setObject( object );
+ // }
//
- // public Object removeObject(InternalFactHandle handle) {
- // Object object = handle.getObject();
+ // public Object removeObject(InternalFactHandle handle) {
+ // Object object = handle.getObject();
//
- // this.assertMap.remove( object );
+ // this.assertMap.remove( object );
//
- // return object;
- // }
+ // return object;
+ // }
public void retractObject(final FactHandle handle) throws FactException {
retractObject( handle,
@@ -641,7 +655,7 @@
try {
final InternalFactHandle handle = (InternalFactHandle) factHandle;
if ( handle.getId() == -1 ) {
- // can't retract an already retracted handle
+ // can't retract an already retracted handle
return;
}
removePropertyChangeListener( handle );
@@ -654,10 +668,12 @@
doRetract( handle,
propagationContext );
- // Update the equality key, which maintains a list of stated FactHandles
+ // Update the equality key, which maintains a list of stated
+ // FactHandles
final EqualityKey key = handle.getEqualityKey();
- // Its justified so attempt to remove any logical dependencies for the handle
+ // Its justified so attempt to remove any logical dependencies for
+ // the handle
if ( key.getStatus() == EqualityKey.JUSTIFIED ) {
this.tms.removeLogicalDependencies( handle );
}
@@ -808,9 +824,13 @@
implements
WorkingMemoryAction {
private InternalFactHandle factHandle;
+
private boolean removeLogical;
+
private boolean updateEqualsMap;
+
private Rule ruleOrigin;
+
private Activation activationOrigin;
public WorkingMemoryRetractAction(final InternalFactHandle factHandle,
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooRuleBase.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooRuleBase.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooRuleBase.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -19,6 +19,7 @@
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
+import java.io.Serializable;
import java.util.HashMap;
import java.util.WeakHashMap;
@@ -217,7 +218,7 @@
super.addWorkingMemory( workingMemory,
keepReference );
- final InitialFactHandle handle = new InitialFactHandle( workingMemory.getFactHandleFactory().newFactHandle( new Object() ) );
+ final InitialFactHandle handle = new InitialFactHandle( workingMemory.getFactHandleFactory().newFactHandle( new Serializable() {} ) );
final PropagationContext propagationContext = new PropagationContextImpl( workingMemory.getNextPropagationIdCounter(),
PropagationContext.ASSERTION,
@@ -242,29 +243,5 @@
protected void removeRule(final Rule rule) {
this.reteooBuilder.removeRule( rule );
}
- // /**
- // * This is to allow the RuleBase to be serializable.
- // */
- // private void readObject(ObjectInputStream is) throws ClassNotFoundException,
- // IOException,
- // Exception {
- // //always perform the default de-serialization first
- // is.defaultReadObject();
- //
- // this.lock = new Object();
- //
- // ObjectTypeResolver resolver = new ClassObjectTypeResolver();
- // this.rete = new Rete( resolver );
- // this.reteooBuilder = new ReteooBuilder( this,
- // resolver );
- // this.globals = new HashMap();
- // this.workingMemories = new WeakHashMap();
- //
- // Package[] packages = this.getPackages();
- // this.pkgs.clear();
- // for ( int i = 0; i < packages.length; i++ ) {
- // this.addPackage( packages[i] );
- // }
- // }
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/TerminalNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/TerminalNode.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/TerminalNode.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+import java.io.Serializable;
import java.util.Iterator;
import org.drools.Agenda;
@@ -319,7 +320,7 @@
return this.rule.equals( other.rule );
}
- class TerminalNodeMemory {
+ class TerminalNodeMemory implements Serializable {
private AgendaGroupImpl agendaGroup;
private ActivationGroup activationGroup;
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaLeftMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaLeftMemory.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaLeftMemory.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -16,6 +16,7 @@
package org.drools.reteoo.beta;
+import java.io.Serializable;
import java.util.Iterator;
import javax.naming.OperationNotSupportedException;
@@ -43,7 +44,7 @@
*
* Created: 12/02/2006
*/
-public interface BetaLeftMemory {
+public interface BetaLeftMemory extends Serializable {
/**
* Adds the given tuple to the memory
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaRightMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaRightMemory.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/beta/BetaRightMemory.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -16,6 +16,7 @@
package org.drools.reteoo.beta;
+import java.io.Serializable;
import java.util.Iterator;
import javax.naming.OperationNotSupportedException;
@@ -43,7 +44,7 @@
*
* Created: 12/02/2006
*/
-public interface BetaRightMemory {
+public interface BetaRightMemory extends Serializable {
/**
* Adds an object to the right memory
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedList.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedList.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedList.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -1,5 +1,6 @@
package org.drools.util;
+import java.io.Serializable;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -42,7 +43,7 @@
* @author <a href="mailto:bo...@we...">Bob McWhirter</a>
*
*/
-public class LinkedList {
+public class LinkedList implements Serializable {
private LinkedListNode firstNode;
private LinkedListNode lastNode;
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedListNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedListNode.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/LinkedListNode.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -16,6 +16,8 @@
* limitations under the License.
*/
+import java.io.Serializable;
+
/**
* Items placed in a <code>LinkedList<code> must implement this interface .
*
@@ -24,7 +26,7 @@
* @author <a href="mailto:mar...@jb...">Mark Proctor</a>
* @author <a href="mailto:bo...@we...">Bob McWhirter</a>
*/
-public interface LinkedListNode {
+public interface LinkedListNode extends Serializable {
/**
* Returns the next node
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java 2006-06-06 09:06:17 UTC (rev 4637)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/util/PrimitiveLongMap.java 2006-06-06 09:59:25 UTC (rev 4638)
@@ -32,7 +32,7 @@
*/
private static final long serialVersionUID = 199618748057741463L;
- private final static Object NULL = new Object() {
+ private final static Object NULL = new Serializable() {
/**
*
|