[jboss-jira] [JBoss JIRA] (DROOLS-67) deadlock when invoking rules concrrently
smita pande (JIRA)
jira-events at lists.jboss.org
Fri Mar 8 00:47:43 EST 2013
[ https://issues.jboss.org/browse/DROOLS-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759645#comment-12759645 ]
smita pande commented on DROOLS-67:
-----------------------------------
Hi Mario,
Sorry for not giving complete information.
Details as below :
Drools Core version that we are currently using is 5.0.1
(I could not select 5.0.1 in New Issue Form hence ahd selected 5.5.0)
The rule checks if the variables strProductType, noOfClaims, pctClaimsByLives within the object meet a certain criteria and based on the output of the evaluation the rule is passed/failed.
Eg: if strProductType = LAB and NoOfClaims > 1 and pctClaimsByLives > 2.5
Then execute the business rule.
The drt has been attached for your reference.
The business rules are called as follows :
RuleBase rb = DroolsRuleManagerFactory.getInstance ((Map) factsToBeAsserted.get (2)).getRuleBase (er, projectName, ruleSetName, ((Map) factsToBeAsserted.get (2)));
/* Based on the package name provided the correponding compiled drts are laoded in rule base */
StatelessSession session = rb.newStatelessSession ();
Map mapGlobals = ((Map) factsToBeAsserted.get (1));
Iterator it = mapGlobals.entrySet ().iterator ();
while (it.hasNext ())
{
Map.Entry pairs = (Map.Entry) it.next ();
session.setGlobal ((String) pairs.getKey (), pairs.getValue ());
}
session.execute ((ArrayList) factsToBeAsserted.get (0));
return factsToBeAsserted;
The problem is when invoking the drts concurrently , we are getting deadlock error as printed in the stacktrace above
while surfing through suport forums it has been indicated that Use of synchrnoized in the CompositeClassloader and JavaDialectRuntime loadclass method causes this issue and this has been fixed in versions 5.3.0 onwards If yes are the jars with jdk1.5 compliant version available
Please advice
Thanks,
Smita
> deadlock when invoking rules concrrently
> ----------------------------------------
>
> Key: DROOLS-67
> URL: https://issues.jboss.org/browse/DROOLS-67
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5
> Reporter: smita pande
> Assignee: Mark Proctor
>
> Owns Monitor Lock on org/drools/rule/JavaDialectRuntimeData$PackageClassLoader at 0E99F9B8/0E99F9C4
> Waiting for Monitor Lock on org/drools/rule/CompositeClassLoader at 0DB50DC0/0DB50DCC
> at java/lang/ClassLoader.loadClass(ClassLoader.java:606(Compiled Code))
> at java/lang/Class.forNameImpl(Native Method)
> at java/lang/Class.forName(Class.java:163(Compiled Code))
> at org/drools/rule/JavaDialectRuntimeData$PackageClassLoader.loadClass(JavaDialectRuntimeData.java:458(Compiled Code))
> at java/lang/ClassLoader.loadClass(ClassLoader.java:606(Compiled Code))
> at /Rule_AutoUW_Rule_BR12Constants_153_0ConsequenceInvoker.evaluate(Rule_AutoUW_Rule_BR12Constants_153_0ConsequenceInvoker.java:16)
> at org/drools/common/DefaultAgenda.fireActivation(DefaultAgenda.java:934(Compiled Code))
> at org/drools/common/DefaultAgenda.fireNextItem(DefaultAgenda.java:885(Compiled Code))
> at org/drools/common/DefaultAgenda.fireAllRules(DefaultAgenda.java:1086(Compiled Code))
> at org/drools/common/AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:661(Compiled Code))
> at org/drools/common/AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:637(Compiled Code))
> at org/drools/reteoo/ReteooStatelessSession.execute(ReteooStatelessSession.java:203(Compiled Code))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list