If you ready to go deeper, you can change a bit of tapestry-hibernate source code to implement it (NOT TESTED)
1. Add a version field (annotated with @Version) to your entity. 2. Add a field version to PersistedEntity. 3. In EntityPersistentFieldStrategy, store version along with id and entity-type into persistedEntity and extract it using id and version. This will take care of the @Persist 4. Do the same for EntityApplicationStatePersistenceStrategy to take case of @SessionState 5. You have to update the ValueEncoders too, may be use entityId_versionId as the client key. Too much work. I know :) regards Taha On Nov 30, 2012, at 5:38 PM, nquirynen wrote: > Hi, > > Thanks for the explanation. Yes with "I understand its not working" I meant > my approach is failing. I understand optimistic locking is working, but just > don't know how to make use of it. > So you mean I have to use Persist instead of activation context? > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-optimistic-locking-tp5718413p5718420.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >