Hi,
I'm currently using Spring and Hibernate in the following configuration:
Spring: 2.0.6
Hibernate: 3.2
Transaction management: Declarative with annotations (@Transactional)
I also use the Spring OpenSessionInViewFilter.
Finnaly, my transactions are configured with the following XML:
<bean id="txManager" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager">
<property name="sessionFactory" ref="fwksessionFactory"/>
</bean>
<tx:annotation-driven transaction-manager="txManager"/>
My problem is that every time I do any kind of data access operation such as session.get(...), the hibernate session is flushed, which is causing an early commit whenever the session is dirty.
Using a debugger, I am able to see that TransactionInterceptor.commitTransactionAfterRetur ning(TransactionInfo txInfo) is being called when I use session.get(...)
I'm not sure what code to post. Imagine any code that calls session.get() for any reason!
Please help if you can,
-Paul


Reply With Quote
