Mark's Blog

Wednesday, September 7, 2011

Persistent Context vs. Entity Manager vs. Transaction

These definitions are from the link: http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/architecture.html
"Entity Manager
The EntityManager API is used to access a database in a particular unit of work. It is used to create and remove persistent entity instances, to find entities by their primary key identity, and to query over all entities. This interface is similar to the Session in Hibernate.
Persistence context

A persistence context is a set of entity instances in which for any persistent entity identity there is a unique entity instance. Within the persistence context, the entity instances and their lifecycle is managed by a particular entity manager. The scope of this context can either be the transaction, or an extended unit of work."
Mark Chen at 4:45 PM

No comments:

Post a Comment

‹
›
Home
View web version

About Me

Mark Chen
I am a senior software designer and developer and specialize in developing Java/JEE,SOA and Web enterprise applications. I am always interested in learning some new stuff.
View my complete profile
Powered by Blogger.