[rules-users] Multithreading use of RuleBase.newStatefulSession orRuleBase.newStatelessSession seems to be causing the engine toget the wrong answer.

Tate Moore tate.moore at gorillalogic.com
Mon Oct 29 14:08:53 EDT 2007


Hopefully this is something I am doing incorrectly, however, when running
the 4.0.X versions of the Drools engine in a multithreaded environment the
rule occasionally gets the wrong answer.   I have attached a simple example
based on the drools-examples-drl structure which runs the engine and
compares the result to a strictly Java rule equivalent.  

 

I have verified that the sample code will produce the incorrect results with
4.0.1, 4.0.2 and 4.0.3 version of the codebase.  Additionally, it doesn’t
seem to matter if I use stateless (which we use in production) or stateful
sessions.  The only work around we have found is to fully synchronize around
any use of the Drools RuleBase methods.  This doesn’t do us much good on our
multi-cored systems.  

 

Thanks for any help on the issue.

Tate Moore


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.12/1098 - Release Date: 2007-10-29
9:28 AM
 
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071029/7e60d1fb/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ThreadingExample.zip
Type: application/x-zip-compressed
Size: 7185 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20071029/7e60d1fb/attachment.bin 


More information about the rules-users mailing list