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