This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 30136
    
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is meant by persistence unit?
 
Similar Threads
Junit test with Embedded Glassfish stop working with persistence.xml
Querying in JPA
Best practice for persistence unit
How to create new persistence unit at run time?
Multiple persistance unit simultaneously, issue.