This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes EntityManager interface persist Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "EntityManager interface persist Method" Watch "EntityManager interface persist Method" New topic

EntityManager interface persist Method

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi , the below is a coding that will be responsible to persist the Customer Entity to the DataBase.

Can anybody please tell me How EntityManager Persist method is working as em is not initialized.

Save India From Corruption - Anna Hazare.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

sorry i didn't see the @PersistenceContext annotation. which is doing all the actions here behind the scenes.
subject: EntityManager interface persist Method
Similar Threads
Application-Managed Transaction without joining
Who didn't use SLSB for DAO?
Could not resolve a persistence unit corresponding to the persistence-context-ref-name
Problem javax.persistence.NoResultException: No entity found for query
Managed entity not synchronised with DB?