2

I have a server that gets request and use DROOLS to evaluate the request.

For each incoming request I create a new statefull session, insert facts (can be more than 100 facts), fire all the rules and dispose of the session.

I find that every insert of a fact causes drools to go to ProjectClassLoader.loadClasss() which is synchronized and blocks my threads (I'm running up to available processor threads with service executor, and this causes performance issues).

It is important to illustrate that all the fact in question are identical. we use multiple threads to evaluate several different request that have the same code as the facts. We would expect Drools to not have to reload the classes over and over again.

Any idea how we can avoid having drools go to the synchronized loadClass() code for every single insert?

summerbulb
  • 5,709
  • 8
  • 37
  • 83
Glass
  • 91
  • 7
  • Are you sure that this also happens for the second fact of class X? – laune Nov 12 '14 at 11:25
  • Why don't you initialize Drools in a static part of your stateful bean? Why is it stateful and not Singleton? Some code would help.... – Simon Zambrovski Nov 12 '14 at 18:49
  • Laune, Worked with debugger and profiler - for sure the code is repeated. Simon, I need statefull session, but I create it with singleton configuration object, it don't solve the problem. Meanwhile, on Drools developer forum I got a response that there is a bottleneck, opened a JIRA: https://issues.jboss.org/browse/DROOLS-648 https://groups.google.com/forum/#!topic/drools-development/xb1e6P3nVGM – Glass Nov 13 '14 at 06:25

0 Answers0