Richard, you have hinted at the lack of thread-safety before, and you were kindly asked to provide a demo for this bug, as it ought to be fixed, but so far you haven't provided one - or did I miss that? Other than this, StatefulKnowledgeSession sure is intended to be thread-safe.
-W 2012/3/4 Richard Calmbach <[email protected]> > 2012/3/2 Matteo Cusmai <[email protected]> > >> i see that there are some other threads that insert new event and some >> others retract them. >> How is the thread model? >> > > Contrary to claims made on this mailing list, StatefulKnowledgeSession is > not thread-safe (this may be due to bugs, but bottomline is: it's not > thread-safe). In order to avoid errors due to multi-threading, don't use > fireUntilHalt(), instead synchronize on the session and only call insert() > and fireAllRules() while synchronized on the session: > > synchronized (session) { > entryPoint.insert(event); > session.fireAllRules(); > } > > -Richard > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
