
JPA
文章平均质量分 87
iteye_19390
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
转载:Spring + JPA + Hibernate + Tomcat + EHCache
Having @ManyToMany(fetch=FetchType.EAGER) attributes can slow down retrieval quite significantly (up to 40 times slower). I recall reading somewhere that FetchType.EAGER is the default for @ManyToMan...原创 2011-11-10 10:31:20 · 122 阅读 · 0 评论 -
转载:Hibernate + JPA @Cache .
先了解一下cache基础: 一级缓存 Hibernate 的一级缓存是由 Session 提供的,因此它只存在于 Session 的生命周期中,当程序调用 save(),update(),saveorupdate() 等方法 及调用查询接口 list,filter,iterate 时,如 session 缓存中还不存在相应的对象, Hibernate 会把该对象加入到一级缓存中, 当 ...原创 2011-11-10 11:30:02 · 116 阅读 · 0 评论 -
Hibernate JPA 中配置Ehcache二级缓存
在Hibernate3 JPA里配置了一下非分布式环境的二级缓存,效果不错。具体过程如下: 1, 需要引入的jar包 http://ehcache.org/downloads/catalog 下载的包里已经包含了简单的例子和javadoc ehcache-core-2.4.6.jar (必需) ehcache-terracotta-2.4...原创 2011-11-10 18:13:59 · 279 阅读 · 0 评论