On 06/03/2013, ismaximum <mnrz57(a)gmail.com> wrote:
I have one question and one problem.
The question is, is multiple instances of stateful session, thread safe?
The problem is, we have a bunch of test cases. Each test class extends from
an abstract class in which drools session will be created. Previously we
stateless session so therefore for each test method we had to create a new
session and call execute() method.
Now because of the huge number of test methods this runs for about 20
minutes. So we decided to change the the session to stateful to make it
After this change, many of test cases have ended with assertion failure
which doesn't make sense. I don't know what's wrong here, before each test
method, we retract any previous fact and we insert new objects.
I'm inclined to say that, given your course of actions, this is very
likely to happen unless you have taken great pains to make your rules
safe from mutual interactions between "transactions" - transactions in
the sense of one related set of inserts/firings/.../retracts. (I can
elaborate on this if necessary.)
Since jnuit runs tests in multiple threads I thought maybe there is an
Yes, but not in the classic sense :-)
Can anyone please help me on this.
View this message in context:
Sent from the Drools: User forum mailing list archive at Nabble.com
rules-users mailing list