Hi Nat, I don't have a certain answer for your situation but I have a couple of things to consider. I know that the HibernateTemplate.flush() method is used to commit a transaction:
http://tinyurl.com/35xf46 But I'm not sure what to do about your synchronization problem. I'm guessing you'll have to use some sort of flag to identify if the update is complete. But I have another thought to consider. AppFuse utilizes caching, and IIRC in some versions and scenarios there were 2 levels of caching of objects. It could be a cache is returning the old version of the object before it has a chance to be updated from the action. Just something else to look at... HTH, Nathan ----- Original Message ----- From: "Nathaniel Rahav" <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, October 1, 2007 5:58:54 PM (GMT-0800) America/Los_Angeles Subject: [appfuse-user] Database immediate commit with DWR ? Greetings, I'm working on an Appfuse 1.8.2 SpringMVC app and having a very strange problem. I dont use a lot of DWR in my app, just a little bit on this one page where I dont want the user to leave the page. Im getting a situation in which the user's action on the page causes a DWR object on the server to retrieve an object, modify it, and save it to the database. Then the client side page refreshes itself. After the page refreshes, sometimes the object shows its new state, and sometimes it appears the same. If I wait a little while, and manually refresh the page, the object then appears modified. So it appears that my action to the database is taking a little while to commit. Is there a way, inside my DWR server side code, to force Spring & Hibernate to commit my action immediately, before DWR finishes and returns control to the client ? thanks in advance, Nat --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
