Thanks for your reply. Just 5 minutes before you responded I found the solution you just gave me.
We have a central AbstractDao.class from which each Dao has to extend. There is a method getFactory which returns the factory which in the counter-turn contains the current session.
So just before we return the sessionFactory I do a
Code:
sessionFactory.getCurrentSession().setFlushMode(FlushMode.MANUAL);
And it stops persisting. Great! Thank you!
//The edit button says:
Be careful though. If you rely on the flush mode "Auto" you may run into troubles that nothing ist persistet after you've applied my procedure :-)
Hamb