jQuery in Action, 2nd edition*
The moose likes EJB and other Java EE Technologies and the fly likes EntityManager.refresh() - Works on Detatched Or Managed Entities ? 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
Reply locked New topic
Author

EntityManager.refresh() - Works on Detatched Or Managed Entities ?

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
[P-298 Of EJB3 In Action Book] States: In the diagram, it shows that using a refresh method a detatched entity can become managed..
[P-332Of EJB3 In Action Book] States: The refresh method only works on managed entities...
Aren;t the above 2 statements contradictory? Moreover Statement1 is incorrect...
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hi Sandeep Vaid..

As far as i know the EntityManager.refresh() used to get the last state of the entity.. (its mean that the Detatched entity will become Manage entity...)..

please correct me if i'm wrong..
i'm not teach you, i just tell you what i know..

Thanks..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9956
    
163

Sandeep,

We have already asked you on earlier occasions, not to ask the same question in multiple forums. I am going to close this one. Let the discussion be continued in your other thread here http://www.coderanch.com/t/472072/Object-Relational-Mapping/java/EntityManager-refresh-works-only-managed


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EntityManager.refresh() - Works on Detatched Or Managed Entities ?
 
Similar Threads
EntityManager.setFlushMode(COMMIT) Vs. Query.setFlushMode(COMMIT)
EntityManager.refresh() works only on managed entities.
EJB3 in Action errata for EntityManager.refresh() method
Bidirectional - Only one @JoinColumn
EntityManager.refresh() - Detatched Entity - IllegalArgumentException