<br> Thanks for reporting. I opened a ticket for that.<br><br><a href="http://jira.jboss.com/jira/browse/JBRULES-1521">http://jira.jboss.com/jira/browse/JBRULES-1521</a><br><br> We will include the fix on 4.0.6.<br><br>
[]s<br> Edson<br><br><div><span class="gmail_quote">2008/3/20, siddhartha banik <<a href="mailto:siddhartha.banik@gmail.com">siddhartha.banik@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div> </div>
<div>Hi Group Members,<br> <br>In Drools 4.0.5 release most of the bugs with <strong>"Working Memory serialization"</strong> are fixed. But still the feature has few bugs. <br> <br>The bug scenario :<br>1. Create a rule Base & Working Memory (Stateful Session).<br>
2. Assert some objects in Working Memory & call fireAll()<br>3. Serialize both Rule Base & Working Memory.<br>4. De Serialize Rule Base & Working Memory.<br>5. Remove Pkg/rule from Rule Base.<br>6. Serialize both Rule Base & Working Memory.<br>
7. De Serialize Rule Base & Working Memory. ---------><strong> In this step Working Memory De Serialization fails with java.lang.ClassNotFoundException.<br></strong>8. Assert some more objects in Working Memory & call fireAll()<br>
<br>I have tested the scenario using <strong>"MarshallingTest.java"</strong> from Drools Codebase. In the <strong>MarshallingTest.testSerializeAddRemove_NoClassDefFoundError()</strong> test case, <br>I have appended bellow mentioned code snippet at end:<br>
</div>
<div>
<p> ruleBase = (RuleBase) serializeIn( serializedRulebase );<br> session = ruleBase.newStatefulSession( new ByteArrayInputStream( serializedSession ) ); <strong>// throws java.lang.ClassNotFoundException Exception<br>
</strong> results = (List) session.getGlobal( "results" );<br> <br> InternalFactHandle stilton5 = (InternalFactHandle) session.insert( new Cheese( "stilton", 30 ) );<br> InternalFactHandle brie5 = (InternalFactHandle) session.insert( new Cheese( "brie", 30 ) );<br>
InternalFactHandle bob7 = (InternalFactHandle) session.insert( new Person( "bob", 30 ) );<br> InternalFactHandle bob8 = (InternalFactHandle) session.insert( new Person( "bob", 40 ) );<br>
session.fireAllRules();<br> <br> assertEquals( 8,<br> results.size() );<br> assertEquals( bob7.getObject(),<br> results.get( 6 ) );<br> assertEquals( bob8.getObject(),<br>
results.get( 7 ) );<br> <br> serializedSession = null;<br> serializedRulebase = null;<br> <br> serializedSession = serializeOut( session );<br> serializedRulebase = serializeOut( ruleBase );<br>
<br> session.dispose();<br> <br> <br><strong>One more bug is:</strong> Can not serialize Working Memory if Rule contains <strong>Accumulate</strong> or <strong>Collect</strong> Conditional element. Because, both of them have nested static class "<strong>AccumulateMemory</strong>" & "<strong>CollectMemory</strong>" respectively, which are not serializable.<br>
</p>
<p>We want to use Drools in our project with its <strong>"Working Memory serialization"</strong> feature to maintain state of Rule Engine between executions. So Fix of All bugs related to <strong>"Working Memory serialization"</strong> feature is very important for us. <br>
<br> <br>Thanks <br>Siddhartha<br></p></div>
<br>_______________________________________________<br>
rules-dev mailing list<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br><br clear="all"></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>