POST QUESTIONS ON THE FORUM! COMMENTS HERE SHOULD ADD VALUE TO THE PAGE!
On 03 Nov 2006 12:17, RBramley wrote:
>I was using the sample code (plus some annotation extensions - see
>above) and started getting java.util.ConcurrentModificationException
>thrown by the postFlush method when it's iterating the set of updates.
>So I've added synchonisation around the Set usage - e.g.
>Set<AuditLogRecord> sUpdates = Collections.synchronizedSet(updates);
>synchronized(sUpdates) {
> sUpdates.add(logRecord);
>}
>Hopefully this will help someone else!
>Robin
I'm facing same problem.I made what you suggested but it is not working.
As AuditLogInterceptor bean is not singleton,it is instantiating per
request(means it is threadsafe).In such conditions
ConcurrentModificationException is very odd.
If you have any idea please reply.
Thanks,
s.rakesh |