If you create another session object for each user request, there is no<br>concurrency issue in the rule engine.<br><br>How do you collect and return the output? Is this sufficiently guarded<br>against race conditions?<br>
<br>-W<br><br><br><div class="gmail_quote">2011/1/17 Nikhil S. Kulkarni <span dir="ltr">&lt;<a href="mailto:Nikhil.Kulkarni@mastek.com">Nikhil.Kulkarni@mastek.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">Hi All,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">                I
am using JBOSS Drools 5.0. The problem which I am currently facing is
concurrent execution of Rules.</p>

<p class="MsoNormal">I am using RuleBase to get Session object</p>

<p class="MsoNormal">i.e.</p>

<p class="MsoNormal">RuleBase ruleBase = RuleBaseFactory.newRuleBase();</p>

<p class="MsoNormal">StatelessSession session = ruleBase.newStatelessSession();</p>

<p class="MsoNormal">Session.execute(ArrayList of Facts);</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">In the application I am creating separate RuleBase and
session object for each request of process. </p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Now the Problem is as follows :-</p>

<p class="MsoNormal">There are currently two users logged in the System.</p>

<p class="MsoNormal">Suppose User 1 clicks a button to process 100 members of
Data using Rules and User 2 clicks same  button to process same 100 members
of Data,</p>

<p class="MsoNormal">When request of User 1 comes to Rule Engine, it starts
processing its data but as User 2 comes to Rule Engine, The engine stops
processing the request</p>

<p class="MsoNormal">of User 1 and continues processing Request of User 2 because
of which I am not getting same output in both the cases though the Input to
Rules is same.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">If I do the process one after the another then I am getting
correct values but it is not working for Concurrent execution.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal"><b>Thanks &amp; Regards,</b></p>

<p class="MsoNormal"><b>Nikhil S. Kulkarni</b></p>

<p class="MsoNormal"><b> </b></p>

<p class="MsoNormal"> </p>

</div>

<br><br><table style="color: black;" bgcolor="white"><tbody><tr><td><br>MASTEK LTD.<br>
In the US, we&#39;re called MAJESCOMASTEK<br>
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.<br>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
</td></tr></tbody></table></div>


<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>