[jboss-user] [JBoss Seam] - Re: How to avoid implicit database update

umarzubair do-not-reply at jboss.com
Mon Jan 29 08:09:50 EST 2007


Now I am using your recommendation
@Begin(flushMode=MANUAL) and at end of conversation calling session.flush() explicitly.

Now I have another problem. Suppose 1 conversation has 2 requests.
In request 1, Application fetch a record say 'A' from database.  
Before second request, Record 'A' gets updated by some other transaction.
In request 2, Application need to execute same query to find record 'A' again with latest data. HibernateSession does not go into database to find latest values for Record 'A' and it return same record 'A' fetched in request 1. 

If I use session.evict(model) in request 1, then request 2 returns latest record from database. 

Is there any way to get latest record from database every time without using evict method.

Regards,
Umar


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007770#4007770

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007770



More information about the jboss-user mailing list