首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring 2.5 & Hibernate 3.2 事宜配置

2012-11-11 
Spring 2.5 & Hibernate 3.2 事务配置配置的时候要注意:if (!isExposeTransactionAwareSessionFactory())

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

热点排行