Hi,
We`re using an AuditInterceptor based on
http://www.hibernate.org/318.html
in hibernate version 3.2.1.ga.
The problem is the postFlush method in the AuditInterceptor is throwing a ConcurrentModificationException when we try to access the Iterator which is passed into the postFlush method.
Code:
public void postFlush(Iterator it) throws CallbackException {
Session session = sessionFactory.openSession();
while(it.hasNext()) {
Object obj = it.next();
//DO STUFF
}
}
The Object obj = it.next(); is throwing the ConcurrentModificationException.
We`re using the AuditInterceptor as a Singleton Spring bean as we were assuming that the Iterators passed in were thread safe which they don`t appear to be. Has anybody else experianced this problem and if so is there a way round it with out changing the Hibernate code?
Thanks
Darran