<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 10/02/2012 03:36, Apache wrote:
<blockquote
cite="mid:1328844969.5191.yext-apple-iphone@web140219.mail.bf1.yahoo.com"
type="cite">
<pre wrap="">Hey,
I am trying to get multiple threads to insert events and run rules against the union of events inserted ( an as soon as they are inserted, a timer drools thread kicking of fireallrules() is not an option because that would introduce a delay ) and wanted some opinion on the following:
1. Stateless session is basically a wrapper around statefulsession and since per doc statefulsession is not threadsafe is it safe to assume 2 threads cannot insert and run fireallrules to compare against a union of objects inserted by multiple threads without some synchronication on event insertion and ESP fireallrulesrules ? ( would the answer still hold despite a drools-camel endpoint reading and storing exchanges from multiple threads ? )</pre>
</blockquote>
stateful sessions are thread safe, they just aren't multi-threaded.
Each of the working memory actions hold a lock, so only one thread
at a time can enter.<br>
<blockquote
cite="mid:1328844969.5191.yext-apple-iphone@web140219.mail.bf1.yahoo.com"
type="cite">
<pre wrap="">
2. If in the above point we simplify the case where the rule uses the "from" keyword and reads from a cache or a Db ( is reading from
A cache supported out of the box ? ) then will drools bhaviour will be bound by the thread which invokes fireallrules() ?
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>