Spring_Hibernate集成

时间:2012-03-16 14:58:11
【文件属性】:
文件名称:Spring_Hibernate集成
文件大小:32KB
文件格式:RAR
更新时间:2012-03-16 14:58:11
Sh集成 1、声明式事务配置 * 配置SessionFactory * 配置事务管理器 * 事务的传播特性 * 那些类那些方法使用事务 2、编写业务逻辑方法 * 继承HibernateDaoSupport类,使用HibernateTemplate来持久化,HibernateTemplate是 Hibernate Session的轻量级封装 * 默认情况下运行期异常才会回滚(包括继承了RuntimeException子类),普通异常是不会滚的 * 编写业务逻辑方法时,最好将异常一直向上抛出,在表示层(struts)处理 * 关于事务边界的设置,通常设置到业务层,不要添加到Dao上
【文件预览】:
spring_hibernate_1
----bin()
--------log4j.properties(2KB)
--------com()
--------hibernate.cfg.xml(1012B)
----src()
--------log4j.properties(2KB)
--------com()
--------hibernate.cfg.xml(1012B)
----.project(394B)
----.classpath(4KB)
----spring_hibernate依赖库.txt(263B)
----readme.txt(594B)
spring_hibernate_2
----bin()
--------log4j.properties(2KB)
--------com()
--------applicationContext-beans.xml(1000B)
--------hibernate.cfg.xml(1013B)
--------applicationContext-common.xml(2KB)
----src()
--------log4j.properties(2KB)
--------com()
--------applicationContext-beans.xml(1000B)
--------hibernate.cfg.xml(1013B)
--------applicationContext-common.xml(2KB)
----.project(394B)
----.classpath(4KB)
----spring_hibernate依赖库.txt(263B)
----readme.txt(2KB)

网友评论