<br><font size=2 face="sans-serif">Hi Laird,</font>
<br>
<br><font size=2 face="sans-serif">In our web application we create one
KnowledgeAgent and each session calls &nbsp;getKnowledgeBase to get the
KnowledgeBase and then getStatelessSession to get a session. &nbsp;We have
not had any threading issues. &nbsp;I'm pretty sure that each of those
operations are thread-safe.</font>
<br>
<br><font size=2 face="sans-serif">Hope this helps,<br>
</font><font size=3>Steve</font>
<br>
<br><tt><font size=2>rules-users-bounces@lists.jboss.org wrote on 11/02/2009
09:13:01 AM:<br>
<br>
&gt; [image removed] </font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Re: [rules-users] Rookie question: best place to locate <br>
&gt; KnowledgeBase in web application?</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; ljnelson </font></tt>
<br><tt><font size=2>&gt; <br>
&gt; to:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; rules-users</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; 11/02/2009 09:16 AM</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Sent by:</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; rules-users-bounces@lists.jboss.org</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; Please respond to Rules Users List</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; <br>
&gt; <br>
&gt; ljnelson wrote:<br>
&gt; &gt; <br>
&gt; &gt; My question is: where is the best place to put the various parts,
and what<br>
&gt; &gt; sort of synchronization do I need to worry about? &nbsp;I did
not see any<br>
&gt; &gt; reference to these issues in the (massive, otherwise excellent)
Drools<br>
&gt; &gt; documentation.<br>
&gt; &gt; <br>
&gt; <br>
&gt; Well, OK, that generated a lot of traffic. &nbsp;:-)<br>
&gt; <br>
&gt; Talking to myself here, let's expand this out a bit and say: OK, how
would<br>
&gt; we do this inside a stateless session bean? &nbsp;I am loathe to write
a resource<br>
&gt; adapter for Drools.<br>
&gt; <br>
&gt; Given that, and that I'm working with stateless sessions exclusively,
I'm<br>
&gt; also willing to live with several instances of Drools--i.e. if I create
the<br>
&gt; engine as an instance variable (or static variable) inside my SLSB,
I'm<br>
&gt; willing to live with the fact that the container might (probably will)<br>
&gt; create several instances of my SLSB, and hence several instances of
my rules<br>
&gt; engine--they'll all be reading the same rules information so should
vend the<br>
&gt; same results.<br>
&gt; <br>
&gt; My main question, for the two of you still reading, is around<br>
&gt; synchronization: I understand that a StatelessKnowledgeSession is
thread<br>
&gt; safe, but what about acquiring it? &nbsp;Where else, if anywhere,
will I run into<br>
&gt; threading issues?<br>
&gt; <br>
&gt; Thanks,<br>
&gt; Laird<br>
&gt; -- <br>
&gt; View this message in context: </font></tt><a href="http://old.nabble.com/Rookie-question%"><tt><font size=2>http://old.nabble.com/Rookie-question%</font></tt></a><tt><font size=2><br>
&gt; 3A-best-place-to-locate-KnowledgeBase-in-web-application--<br>
&gt; tp26152111p26157126.html<br>
&gt; Sent from the drools - user mailing list archive at Nabble.com.<br>
&gt; <br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; rules-users@lists.jboss.org<br>
&gt; </font></tt><a href="https://lists.jboss.org/mailman/listinfo/rules-users"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/rules-users</font></tt></a><tt><font size=2><br>
</font></tt>