<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yybean.com Java编程 Web开发 Ajax技术 Spring框架 Struts2框架 Hibernate技术 在线文档 &#187; Hibernate</title>
	<atom:link href="http://www.yybean.com/category/hibernate/feed" rel="self" type="application/rss+xml" />
	<link>http://www.yybean.com</link>
	<description>一个java web精品小站...</description>
	<lastBuildDate>Thu, 05 Jan 2012 07:11:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hibernate查询之Criteria</title>
		<link>http://www.yybean.com/hibernate-criteria-queries</link>
		<comments>http://www.yybean.com/hibernate-criteria-queries#comments</comments>
		<pubDate>Sat, 04 Sep 2010 07:57:04 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate criteria]]></category>
		<category><![CDATA[hibernate 条件查询]]></category>
		<category><![CDATA[hibernate条件]]></category>
		<category><![CDATA[hibernate查询]]></category>

		<guid isPermaLink="false">http://www.yybean.com/hibernate-criteria-queries</guid>
		<description><![CDATA[Hibernate 设计了 CriteriaSpecification 作为 Criteria 的父接口，下面提供了 Criteria和DetachedCriteria 。&#160;&#160; 

Criteria 和 DetachedCriteria 的主要区别在于创建的形式不一样， Criteria 是在线的，所以它是由 Hibernate Session 进行创建的；而 DetachedCriteria 是离线的，创建时无需 Session，DetachedCriteria 提供了 2 个静态方法 forClass(Class) 或 forEntityName(Name) 进行DetachedCriteria 实例的创建。

<span class="readmore"><a href="http://www.yybean.com/hibernate-criteria-queries" title="Hibernate查询之Criteria">阅读全文——共8542字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/hibernate-criteria-queries/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hibernate查询之HQL</title>
		<link>http://www.yybean.com/the-hql-hibernate-query</link>
		<comments>http://www.yybean.com/the-hql-hibernate-query#comments</comments>
		<pubDate>Tue, 31 Aug 2010 14:22:02 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate hql删除]]></category>
		<category><![CDATA[hibernate hql参数]]></category>
		<category><![CDATA[hibernate hql更新]]></category>
		<category><![CDATA[hibernate hql查询]]></category>
		<category><![CDATA[hibernate hql语法]]></category>

		<guid isPermaLink="false">http://www.yybean.com/the-hql-hibernate-query</guid>
		<description><![CDATA[Criteria查询对查询条件进行了面向对象封装，符合编程人员的思维方式，不过HQL (Hibernate Query Lanaguage)查询提供了更加丰富的和灵活的查询特性，因此Hibernate将HQL查询方式立为官方推荐的标准查询方式，HQL查询在涵盖 Criteria查询的所有功能的前提下，提供了类似标准SQL语句的查询方式，同时也提供了更加面向对象的封装。完整的HQL语句形势如下：   Select/update/delete…… from …… where …… group by …… having …… order by …… asc/desc    其中的update/delete为Hibernate3中所新添加的功能，可见HQL查询非常类似于标准SQL查询。由于HQL查询在整个Hibernate实体操作体系中的核心地位，这一节我将专门围绕HQL操作的具体技术细节进行讲解。    

<span class="readmore"><a href="http://www.yybean.com/the-hql-hibernate-query" title="Hibernate查询之HQL">阅读全文——共7865字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/the-hql-hibernate-query/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate的缓存机制介绍</title>
		<link>http://www.yybean.com/hibernates-caching-mechanism-introduced</link>
		<comments>http://www.yybean.com/hibernates-caching-mechanism-introduced#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:13:57 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate 二级缓存]]></category>
		<category><![CDATA[hibernate查询缓存]]></category>
		<category><![CDATA[hibernate的缓存]]></category>
		<category><![CDATA[hibernate缓存机制]]></category>

		<guid isPermaLink="false">http://www.yybean.com/hibernates-caching-mechanism-introduced</guid>
		<description><![CDATA[缓存是介于应用程序和物理数据源之间，其作用是为了降低应用程序对物理数据源访问的频次，从而提高了应用的运行性能。缓存内的数据是对物理数据源中的数据的复制，应用程序在运行时从缓存读写数据，在特定的时刻或事件会同步缓存和物理数据源的数据。

缓存的介质一般是内存，所以读写速度很快。但如果缓存中存放的数据量非常大时，也会用硬盘作为缓存介质。缓存的实现不仅仅要考虑存储的介质，还要考虑到管理缓存的并发访问和缓存数据的生命周期。

Hibernate的缓存包括Session的缓存和SessionFactory的缓存，其中SessionFactory的缓存又可以分为两类：内置缓存和外置缓存。Session的缓存是内置的，不能被卸载，也被称为Hibernate的第一级缓存。SessionFactory的内置缓存和Session的缓存在实现方式上比较相似，前者是SessionFactory对象的一些集合属性包含的数据，后者是指Session的一些集合属性包含的数据。SessionFactory的内置缓存中存放了映射元数据和预定义SQL语句，映射元数据是映射文件中数据的拷贝，而预定义SQL语句是在Hibernate初始化阶段根据映射元数据推导出来，SessionFactory的内置缓存是只读的，应用程序不能修改缓存中的映射元数据和预定义SQL语句，因此SessionFactory不需要进行内置缓存与映射文件的同步。SessionFactory的外置缓存是一个可配置的插件。在默认情况下，SessionFactory不会启用这个插件。外置缓存的数据是数据库数据的拷贝，外置缓存的介质可以是内存或者硬盘。SessionFactory的外置缓存也被称为Hibernate的第二级缓存。

<span class="readmore"><a href="http://www.yybean.com/hibernates-caching-mechanism-introduced" title="Hibernate的缓存机制介绍">阅读全文——共3153字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/hibernates-caching-mechanism-introduced/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hibernate JPA</title>
		<link>http://www.yybean.com/hibernate-jpa</link>
		<comments>http://www.yybean.com/hibernate-jpa#comments</comments>
		<pubDate>Fri, 23 Jul 2010 01:27:26 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate jpa教程]]></category>
		<category><![CDATA[hibernate jpa配置]]></category>
		<category><![CDATA[jpa]]></category>
		<category><![CDATA[jpa hibernate比较]]></category>

		<guid isPermaLink="false">http://www.yybean.com/hibernate-jpa</guid>
		<description><![CDATA[近年来ORM(Object-Relational Mapping)对象关系映射，即实体对象和数据库表的映射)技术市场人声音鼎沸，异常热闹， Sun在充分吸收现有的优秀ORM框架设计思想的基础上，制定了新的JPA(Java Persistence API)规范。JPA Java Persistence API，是Java EE 5的标准ORM接口，也是ejb3规范的一部分。

那么什么是JPA呢？JPA是通过JDK5.0注解或XML描述对象-关系表的映射关系，并将运行期实体对象持久化到数据库中去。

<span class="readmore"><a href="http://www.yybean.com/hibernate-jpa" title="Hibernate JPA">阅读全文——共6061字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/hibernate-jpa/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate 数据操纵基础</title>
		<link>http://www.yybean.com/hibernate-basic-data-manipulation</link>
		<comments>http://www.yybean.com/hibernate-basic-data-manipulation#comments</comments>
		<pubDate>Thu, 01 Jul 2010 16:23:24 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate save]]></category>
		<category><![CDATA[hibernate缓存]]></category>
		<category><![CDATA[ibernate基础教程]]></category>

		<guid isPermaLink="false">http://www.yybean.com/hibernate-basic-data-manipulation</guid>
		<description><![CDATA[Hibernate中持久对象有三种状态：瞬时（transient）状态；持久化 (persistent) 状态；脱管(detached) 状态。持久对象的三种状态的转变依赖session对象上的操作进行。     

上面提到Hibernate 中一个重要的类SESSION。作用相当于JDBC中CONNECTION对象。是执行持久化操作（crud）的主要类。当一个对象被持久化时，会被加到session缓存中。Session缓存的作用是减少数据库的访问频率，提高性能。正是由于其缓存的存在，在各个方法的差异中最大的不同就是处理缓存数据的方式不同。从而导致性能各异。理解HIBERNATE的工作原理，主要就是要理解其缓存工作机制，以及缓存与数据库的之间维护，从而能了解到其提供的各种操作方法上的区别。     下面描述了持久对象状态转化时操作方法： 

<span class="readmore"><a href="http://www.yybean.com/hibernate-basic-data-manipulation" title="Hibernate 数据操纵基础">阅读全文——共5721字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/hibernate-basic-data-manipulation/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Hibernate配置EhCache缓存之annotation注解</title>
		<link>http://www.yybean.com/hibernate-configuration-ehcache-cache-of-annotation-notes</link>
		<comments>http://www.yybean.com/hibernate-configuration-ehcache-cache-of-annotation-notes#comments</comments>
		<pubDate>Sat, 29 May 2010 07:08:09 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[缓存]]></category>
		<category><![CDATA[hibernate ehcache]]></category>
		<category><![CDATA[hibernate ehcache annotation]]></category>
		<category><![CDATA[hibernate ehcache query]]></category>
		<category><![CDATA[hibernate ehcache 配置]]></category>

		<guid isPermaLink="false">http://www.yybean.com/hibernate-configuration-ehcache-cache-of-annotation-notes</guid>
		<description><![CDATA[ms注解是种流行，越来越多的注解，越来越多的零配置

1.&#160; 首先设置EhCache，建立配置文件ehcache.xml，默认的位置在class-path，可以放到你的src目录下：



<span class="readmore"><a href="http://www.yybean.com/hibernate-configuration-ehcache-cache-of-annotation-notes" title="Hibernate配置EhCache缓存之annotation注解">阅读全文——共2271字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/hibernate-configuration-ehcache-cache-of-annotation-notes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSessionInViewFilter作用及配置</title>
		<link>http://www.yybean.com/opensessioninviewfilter-role-and-configuration</link>
		<comments>http://www.yybean.com/opensessioninviewfilter-role-and-configuration#comments</comments>
		<pubDate>Fri, 21 May 2010 03:09:38 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[框架整合]]></category>
		<category><![CDATA[opensessioninviewfilter]]></category>
		<category><![CDATA[opensessioninviewfilter作用]]></category>
		<category><![CDATA[Write operations are not allowed in read-only mode]]></category>

		<guid isPermaLink="false">http://www.yybean.com/opensessioninviewfilter-role-and-configuration</guid>
		<description><![CDATA[一、作用

Spring为我们解决Hibernate的Session的关闭与开启问题。    Hibernate 允许对关联对象、属性进行延迟加载，但是必须保证延迟加载的操作限于同一个 Hibernate Session 范围之内进行。如果 Service 层返回一个启用了延迟加载功能的领域对象给 Web 层，当 Web 层访问到那些需要延迟加载的数据时，由于加载领域对象的 Hibernate Session 已经关闭，这些导致延迟加载数据的访问异常 

(eg： org.hibernate.LazyInitializationException:(LazyInitializationException.java:42)      - failed to lazily initialize a collection of role: cn.easyjava.bean.product.ProductType.childtypes, no session or session was closed       org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: cn.easyjava.bean.product.ProductType.childtypes, no session or session was closed)

<span class="readmore"><a href="http://www.yybean.com/opensessioninviewfilter-role-and-configuration" title="OpenSessionInViewFilter作用及配置">阅读全文——共6297字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/opensessioninviewfilter-role-and-configuration/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spring Hibernate整合要点之JPA</title>
		<link>http://www.yybean.com/spring-hibernate-integration-of-the-main-points-of-the-jpa</link>
		<comments>http://www.yybean.com/spring-hibernate-integration-of-the-main-points-of-the-jpa#comments</comments>
		<pubDate>Fri, 21 May 2010 03:07:40 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[框架整合]]></category>
		<category><![CDATA[hibernate jpa教程]]></category>
		<category><![CDATA[hibernate jpa配置]]></category>
		<category><![CDATA[jpa hibernate]]></category>
		<category><![CDATA[spring hibernate]]></category>
		<category><![CDATA[SSH整合]]></category>

		<guid isPermaLink="false">http://www.yybean.com/spring-hibernate-integration-of-the-main-points-of-the-jpa</guid>
		<description><![CDATA[一、依赖包





<span class="readmore"><a href="http://www.yybean.com/spring-hibernate-integration-of-the-main-points-of-the-jpa" title="Spring Hibernate整合要点之JPA">阅读全文——共5759字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/spring-hibernate-integration-of-the-main-points-of-the-jpa/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2EE事务并发控制策略总结</title>
		<link>http://www.yybean.com/j2ee-transaction-concurrency-control-strategy-summary</link>
		<comments>http://www.yybean.com/j2ee-transaction-concurrency-control-strategy-summary#comments</comments>
		<pubDate>Thu, 13 May 2010 16:03:39 +0000</pubDate>
		<dc:creator>yybean</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate 事务]]></category>
		<category><![CDATA[j2ee 事务]]></category>
		<category><![CDATA[jpa hibernate]]></category>
		<category><![CDATA[jpa 并发事务]]></category>
		<category><![CDATA[事务]]></category>
		<category><![CDATA[并发]]></category>

		<guid isPermaLink="false">http://www.yybean.com/j2ee-transaction-concurrency-control-strategy-summary</guid>
		<description><![CDATA[本文结合hibernate以及JPA标准，对J2EE当前持久层设计所遇到的几个问题进行总结：

&#160;

当前J2EE项目中，面临的一个共同问题就是如果控制事务的并发访问，虽然有些持久层框架已经为我们做了很多工作，但是理解原理，对于我们开发来说还是很有用处的。

<span class="readmore"><a href="http://www.yybean.com/j2ee-transaction-concurrency-control-strategy-summary" title="J2EE事务并发控制策略总结">阅读全文——共6503字</a></span>]]></description>
		<wfw:commentRss>http://www.yybean.com/j2ee-transaction-concurrency-control-strategy-summary/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

