[rules-users] Rookie question: best place to locate KnowledgeBase in web application?

Greg Barton greg_barton at yahoo.com
Mon Nov 2 10:59:54 EST 2009


I believe acquiring a StatelessKnowledgeSession is thread safe as well.

Many members of the drools dev team are traveling at the moment, hence the slow response.

--- On Mon, 11/2/09, ljnelson <ljnelson at gmail.com> wrote:

> From: ljnelson <ljnelson at gmail.com>
> Subject: Re: [rules-users] Rookie question: best place to locate KnowledgeBase in web application?
> To: rules-users at lists.jboss.org
> Date: Monday, November 2, 2009, 9:13 AM
> 
> 
> ljnelson wrote:
> > 
> > My question is: where is the best place to put the
> various parts, and what
> > sort of synchronization do I need to worry
> about?  I did not see any
> > reference to these issues in the (massive, otherwise
> excellent) Drools
> > documentation.
> > 
> 
> Well, OK, that generated a lot of traffic.  :-)
> 
> Talking to myself here, let's expand this out a bit and
> say: OK, how would
> we do this inside a stateless session bean?  I am
> loathe to write a resource
> adapter for Drools.
> 
> Given that, and that I'm working with stateless sessions
> exclusively, I'm
> also willing to live with several instances of Drools--i.e.
> if I create the
> engine as an instance variable (or static variable) inside
> my SLSB, I'm
> willing to live with the fact that the container might
> (probably will)
> create several instances of my SLSB, and hence several
> instances of my rules
> engine--they'll all be reading the same rules information
> so should vend the
> same results.
> 
> My main question, for the two of you still reading, is
> around
> synchronization: I understand that a
> StatelessKnowledgeSession is thread
> safe, but what about acquiring it?  Where else, if
> anywhere, will I run into
> threading issues?
> 
> Thanks,
> Laird
> -- 
> View this message in context: http://old.nabble.com/Rookie-question%3A-best-place-to-locate-KnowledgeBase-in-web-application--tp26152111p26157126.html
> Sent from the drools - user mailing list archive at
> Nabble.com.
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 


      




More information about the rules-users mailing list