This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

Thank you so much Jeanne
 
Have you checked out Aspose?
 
subject: What is meant by persistence unit?
 
It's not a secret anymore!