Greetings
In one of my projects, I noticed that one rule did not fire when it was supposed to, and could narrow down the problem to my usage of persistent transactions. The attached Eclipse/Maven project illustrates the problem: Test1 and Test2 insert the same fact within the session, against the same rule set. The only difference is that Test1 uses in-memory session whilst Test2 uses a persistent session. When running Test1 you see that 2 rules fire (R1/R2), as expected, whereas Test2 would fire only 1 rule (R2). I thought of some race condition, and introduced in Test3 delays everywhere, but the problem remains.
rule "R1" when X() then System.out.println("R1"); end rule "R2" when X() then System.out.println("R2"); end
The code for the persistent version is boilerplate code directly generated by the JBoss Developer Studio 7.1.1 GA wizard.
Any idea where the problem could be?
Thanks
JP