wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes What is meant by persistence unit? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What is meant by persistence unit?" Watch "What is meant by persistence unit?" New topic
Author

What is meant by persistence unit?

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

please refer the following URL http://www.javaworld.com/javaworld/jw-10-2008/jw-10-ejb3.html?page=4. an excerpt from it is as follows

For persistence, you need a JPA deployment descriptor named persistence.xml.
Injecting the EntityManager without specifying the persistence unit works only if a single persistence unit is specified in persistence.xml,


i read the whole article, but i do not understand what is a PERSISTENCE UNIT?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

A persistence unit is a grouping of JPA entities. This serves as a nice review of the terms.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

Thank you so much Jeanne
 
Don't get me started about those stupid light bulbs.
 
subject: What is meant by persistence unit?