The solution to this was to [DEBUG] [main|Default Evict Event Listener] evicting [Entity Name] [DEBUG] [main|Default Save Or Update Event Listener] updating detached instance [DEBUG] [main|Default Save Or Update Event Listener] updating [Entity Name#3] [DEBUG] [main|Default Save Or Update Event Listener] updating [Entity Name#3] This entry was posted on Thursday, February 19th, 2009 at and is filed under hibernate, spring.
You can follow any comments to this entry through the RSS 2.0 feed.
So 1 million new customers would equal a total of 2 million insert statements in this case. These two parameters tell Hibernate to sort the insert and update statements before trying to batch them up.
Hibernate flushes by default for the following reasons: The thing to note here is that until the session is flushed, every persistent object is placed into the first level cache (your JVM's memory).This way framework’s code (internal stereotypes) can alter, and still have “older version clients” running without (significant) change.One of such hooks that Hibernate actually to use is evicting the object from the session.The first is to maintain a reasonable first level cache size so that you do not run out memory.The second is that you want to batch the inserts and updates so that they are executed efficently by the database.