This link has been bookmarked by 4 people . It was first bookmarked on 23 Jul 2008, by Emmanuel Hugonnet.
-
-
Configuring Hibernate and Spring for JTA
-
This is where auto flushing comes in. When the flush mode of the session is set to "AUTO", Hibernate will inspect the in-memory state to see if there are any changes that might influence the result of any query that it is about to execute. If Hibernate determines this is so, it will flush the session, synchronizing the in-memory state and the database state. This will not alter the transactional status, but inly execute some SQL statements within the current transactional context.
-
-
Emmanuel HugonnetThis blog addresses a problem in a configuration that is fairly common: use Spring for transaction management on top of a JTA provider and use Hibernate for persistence. Transaction demarcation is easy and declarative with Spring. The problem is that Hibernate sometimes needs to detect the current transaction and this needs to be configured. This leads to hard to detect bugs in applications that rely on auto flushing.
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.