I received the following exception while calling Rete.listDefinstances(): stackTrace: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:750) at java.util.HashMap$KeyIterator.next(HashMap.java:786) at java.util.AbstractCollection.toArray(AbstractCollection.java:170) at java.util.ArrayList.<init>(ArrayList.java:132) at jess.DefinstanceList.listDefinstances(DefinstanceList.java:52) at jess.Rete.listDefinstances(Rete.java:499)
There is a strong possibility that (definstance) was being called by a rule running on another thread at the time. This brings up a couple of questions: 1) Is this expected behavior? 2) In general, does jess make any guarantees w.r.t. concurrent modifications for public API's that return collections/iterators? 3) Is there a difference between calling (definstance) or Rete.definstance(...)? 4) Does jess maintain a lock object (or some other mechanism) I can use to make sure my access to the API is safe? alan Alan Moore - mailto:[EMAIL PROTECTED] Ciphergen Biosystems - http://www.ciphergen.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------