aspose file tools*
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 Spring in Action this week in the Spring 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: 10207
    
166

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]
 
Don't get me started about those stupid light bulbs.
 
subject: EntityManager.refresh() - Works on Detatched Or Managed Entities ?