On Wed, 8 Oct 2003 17:31:15 +0100, Michael Watson <[EMAIL PROTECTED]> wrote:
Hi all,
I'm finding I quite reguarly get this exception when I'm attempting to call
PersistenceBroker.store(Object) from multiple threads simultaneously.
Do several threads share the same PB instance? If so, this is not allowed. PB instances are not threadsafe itself, but they are pooled so it's no performance impact to use a separate PB instance for each thread.
regards, Armin
<?xml version='1.0'?> <exception> <cause> <detailMessage/> <exceptionClass>java.util.ConcurrentModificationException</exceptionClass> <stackTrace> <stackTrace>java.util.AbstractList$Itr.checkForComodification(AbstractList.j ava:444)</stackTrace> <stackTrace>java.util.AbstractList$Itr.next(AbstractList.java:417)</stackTra ce> <stackTrace>java.util.AbstractCollection.remove(AbstractCollection.java:250) </stackTrace> <stackTrace>org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)</stackTrace> <stackTrace>org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)</stackTrace> <stackTrace>org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unk nown Source)</stackTrace> ... </stackTrace> </cause> <detailMessage>Failed to update History record java.util.ConcurrentModificationException</detailMessage> <exceptionClass>org.apache.ojb.broker.PersistenceBrokerException</exceptionC lass> <stackTrace/> </exception>
Obviously somewhere in the broker there's been an attempt to modify the structure of a list by 2 or more threads simultaneously.
My question is, has anything been done to prevent this in a newer version or
should I just catch these exceptions and retry the store?
I'm using ojb-1.0.rc3 at the moment.
Regards,
Mike
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
