Drools 4.0.7
Are running drools queries against working memory thread safe? I know that
inserts and retracts need to be synchronized but what about queries? I
would am considering having multiple threads querying working memory for
different facts at the same time.
For example:
final QueryResults results = workingMemory.getQueryResults("GetMCCObjects");
for (Iterator it = results.iterator(); it.hasNext(); ) {
result = (QueryResult) it.next();
mccDelObj = (MerchantCategoryGroup) result.get("mccObjects");
fhMCCGroup = workingMemory.getFactHandle(mccDelObj);
WMSyncdInsertRetract(fhMCCGroup, RETRACT);
}
Scott