Ok, so there are two main possibilities.. either the locking mechanism
does not work appropriately
and there is a concurrency issue, or the particular rule structure
exposes an edge case in node
comparison and reuse.
The former is more probable, but should be relatively easy to see. I
need your help in testing this
in the production environment where you get the exception.
You should essentially add a
org.drools.event.knowledgebase.KnowledgeBaseEventListener to the
knowledge base :
kb.addEventListener( new MyLoggingKBEventListener() );
and provide an implementation that suitably logs which thread is
executing which action.
The KnowledgeBaseEventListener is an interface with methods such as:
void beforeKnowledgeBaseLocked(BeforeKnowledgeBaseLockedEvent event);
void afterKnowledgeBaseLocked(AfterKnowledgeBaseLockedEvent event);
void beforeRuleAdded(BeforeRuleAddedEvent event);
void afterRuleAdded(AfterRuleAddedEvent event);
Can you try this solution?
On 05/08/2013 10:57 AM, mohdejaz74 wrote:
I use KB methods directly
For adding/updating a rule, I create a temporary instance of
KnowledgeBuilder and add the rule to check if there are any errors.
If there are no errors, I first remove (if rule needs to be updated) the
previous rule by calling this ...
Then I add the new rule ...
View this message in context:
Sent from the Drools: User forum mailing list archive at Nabble.com
rules-users mailing list