Thanks Martijn, Your implementation is inspiring. I will rewrite mine 
following your example. Merging adds some problems in itself, and some 
more if you want to be smart to the user when some field conflict. There 
even is a problem when no fields conflict because the resulting record 
might not be what the user expected when saving. So it is probably 
necessary to return the actual and modified values in any case if 
versions differ. (ie even if there was no field confict.)


Martijn Dashorst a écrit :
> Just a general comment on this thread, I have added a VersionedForm to
> our application which will discover a stale object based on the
> version number in the object (using javax.persistence @Version
> annotation). I have described this component here:
> (BTW Frank: woogle didn't find this article!)
> If a concurrent update has been detected, the form will repopulate
> with the values from the database. The user should then re enter the
> values (as the previous values were based on old information, the new
> data can invalidate his data!).
> It doesn't do locking across requests, and has served our purpose. It
> may provide you with an alternative.
> Martijn

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to