Are you using the same session? Sessions are not thread-safe in drools.<div><br></div><div>Best, <br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>

- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Fri, Nov 26, 2010 at 12:12 PM, OptimusPrime <span dir="ltr">&lt;<a href="mailto:the.maxxxx@gmail.com">the.maxxxx@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Hello,<br>
<br>
I wrote a micro benchmark in order to test the performance of Drools Flow<br>
5.1.0 in single and multi-threaded environments.<br>
<br>
And I noticed that, when 2 threads call startProcess() at the same time<br>
(Intel Core 2 Duo CPU), the returned process instance IDs are the same.<br>
<br>
I checked the code and it seems there is no locking mechanism in the<br>
org.drools.process.instance.impl.DefaultProcessInstanceManager class for the<br>
id creation.<br>
<br>
Is this a bug or am I missing something ?<br>
<br>
Thanks<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/StatefulKnowledgeSession-startProcess-not-thread-safe-tp1973203p1973203.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/StatefulKnowledgeSession-startProcess-not-thread-safe-tp1973203p1973203.html</a><br>


Sent from the Drools - User mailing list archive at Nabble.com.<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>
</font></blockquote></div><br></div>