Tapernate allows you to use detached objects and still enforce optimistic locking. You have to use @Persist("reattach-merge") so that Tapernate will try to merge() your object. If the object stored in the session has the old version number, you'll get the exception.
-----Original Message----- From: Ben Dotte [mailto:[EMAIL PROTECTED] Sent: Monday, June 19, 2006 6:24 PM To: Tapestry users Subject: [OT] Tapernate and Optimistic Locking Our Tapestry application is using Tapernate-like behavior to load persisted objects in automatically at the beginning of each request and now I've been asked to look into changing our database locking strategy from pessimistic to optimistic. I've tried versioning the objects as is suggested for Hibernate but the problem is I have no basis for comparison between versions since each object gets reloaded at the beginning of each request, and the StaleObjectStateException I am expecting never gets thrown. I can't figure out how optimistic locking would ever work unless you are using detached objects. Has anyone come across a good solution to this problem without resorting to detached objects? Thanks, Ben --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]