Spring 2.5 & Hibernate 3.2 事务配置
配置的时候要注意:
if (!isExposeTransactionAwareSessionFactory()) {
? // Not exposing a SessionFactory proxy with transaction-aware
? // getCurrentSession() method -> set Hibernate 3.1 CurrentSessionContext
? // implementation instead, providing the Spring-managed Session that way.
? // Can be overridden by a custom value for corresponding Hibernate property.
? config.setProperty(Environment.CURRENT_SESSION_CONTEXT_CLASS, "org.springframework.orm.hibernate3.SpringSessionContext");
}
=================================================================
?URL:http://histos.net/blog/2008/12/on-hibernate-spring-sessions-and-transactions.html