> > > > Using the JPA extended persistence context (not EJB), the clear() will > eliminate any changes to the model before JPA comes to flush to the db. I > assume it would work in an EJB container too. >
I'm not really sure I get the point your making here, but if you just do not want the EntityManager not flush to the database, shouldn't you rather just update the model outside of the transaction. Indeed calling the clear operation on the entity manager also results in all managed entities becoming detached. Beyond many operations on the current persistence context might result in the entity manager flushing state to the database. Yet having it behave differently because of updating managed entities outside of the tx also sometimes have the persistence context not behave as one would expect... Not sure how useful this was now, yet my $.02 ;) -- Alexander Snaps <[EMAIL PROTECTED]> http://www.jroller.com/page/greenhorn http://www.linkedin.com/in/alexandersnaps