On Fri, 30 Nov 2012 08:47:55 -0200, nquirynen <nat...@pensionarchitects.be> wrote:

Hi,

Hi!

When I submit the form it will always first get the Person object again
through onActivate so I understand why this isnt working.

It's actually working. Optimistic locking doesn't seem to actually be what you think it is. Hibernate will throw an optimistic locking exception when you get an object from the database and, in another thread this object is changed in the database, and in the first thread you try to send the object to the database. As you're always getting the object again in onActivate(), there's a very tiny time window in which an optimistic locking error would occur (in this scenario, after onActivate() is finished and before onSuccess() is invoked). If you put the object in the session instead of reloading it in onActivate(), you would be able to see an optimistic locking exception being thrown.

--
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to