Hi guys,

Is the line
new Printer( session.getFactory() ).toString( persistenceContext.getEntitiesByKey().values().iterator(), session.getEntityMode() );
in AbstractFlushingEventListener really necessary ?


It can/will cause ConcurrentModificationException if you e.g. have debug on and this "innocent" toString method on your objects and
your customer is not yet initialized.


class Order {

String toString() {
return "Order " + getId() + " for customer " + getCustomer().getId() + " in " + getCustomer().getLocation();


   }
}

/max



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to