You could use session-per-conversation (object's stay attached to the
session, but the session is detached from the DB-connection at the end of
each request). 

It's described here: http://hibernate.org/42.html .
A tapestry-implementation comes with honeycomb:
http://honeycomb.javaforge.com .

> -----Original Message-----
> From: Ben Dotte [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 20, 2006 12:24 AM
> 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]

Reply via email to