Hello I have an e-commerce application. And I am using JSF and stateless
EJB's.

In a session managed bean I am storing the User object who is dosconnected.
At certain point the user wants to change its account. I am updateing the
users Account. At tis point I want to synchronize the disconected User
object to the database.

problems:

1. I cannot use refresh because the entity is disconnected.
2. I cannot use merge because old data will apply upon the new data and the
changes that were made will be rollbacked.
3. If i use entity.find(id) wouldn't it be too expensive operation?

How to refresh the state of a disconnected entity? Thanks in atdvance.


And I have one more question. Lets suppose that I have customer entity and
this entity has relation with Accounts with fetch type set to LAZY. If at
certain moment I need to fetch this records and the User Entity is
disconnected what is the best way to achieve this?    
  
This topic has no replies.  
 
 

-- 
View this message in context: 
http://www.nabble.com/Refresh-disconnected-entity-tf3908078.html#a11080464
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to