Hi,

I am developing a web service that evaluates risks on a certain fact, I accumulate the risks in the working memory (stateless working memory), but i need to return the asserted risks from the web service

the web method signature is like public Risks assertFact(Fact fact)
where Risks:
          factId
          Risk[]

The operation of insertion of a fact into the working memory is thread safe (there is a lock object invoked in the execute or insert operation). I need to know if i called workingMemory.executeWithResults() and getting the global variable , are these results thread safe ?

public Risks assertFact(Fact fact){
...
synchronized(workingMemory){
 StatelessSessionResult result = workingMemory.executeWithResults(fact);
  risks = result.getGlobal("xyz");
}
...
return risks
}


it would be better to remove the synchronized block , but I don't know if this is okay or not.

Thanks in advance.

Best regards,
--
Waleed Zedan