| [Texo] OptimisticLockException [message #1060586] |
Mon, 27 May 2013 03:57  |
Bastian Wagenfeld Messages: 91 Registered: January 2013 |
Member |
|
|
Hi Martin,
I just wanted to ask you, if there is an intended way to solve the following situation:
We have two client RCPs and one Texo server. One client deletes an object and immediately persists the changes via Texo. Meanwhile the other client changes the same object and tries to save the changes. Of course, the second client gets an exception (on the server it is the OptimisticLockException), since the object cannot be merged.
So is there an implemented way to deal with this in Texo? Like setting a parameter to not merge this object, but persist it instead (this might be more of an EclipseLink question). Otherwise my approach would be to send back a warning to inform the user.
Best regards
Bastian
|
|
|
| Re: [Texo] OptimisticLockException [message #1060587 is a reply to message #1060586] |
Mon, 27 May 2013 04:00   |
Martin Taal Messages: 5057 Registered: July 2009 |
Senior Member |
|
|
Hi Bastian,
A variant of this is that the object has been changed since the last time it was loaded by the client. The software I
have worked with/developed in this case always gave a warning to the user 'Data changed by other user, please refresh
and apply your changes again'.
In your case I would give a 'Data has been deleted' warning to the user.
But there is no standard way of doing this, so you would need to catch the exception to see what the cause is on the
server and response to the client in the correct way.
gr. Martin
On 05/27/2013 09:57 AM, Bastian Wagenfeld wrote:
> Hi Martin,
>
> I just wanted to ask you, if there is an intended way to solve the following situation:
>
> We have two client RCPs and one Texo server. One client deletes an object and immediately persists the changes via Texo.
> Meanwhile the other client changes the same object and tries to save the changes. Of course, the second client gets an
> exception (on the server it is the OptimisticLockException), since the object cannot be merged.
>
> So is there an implemented way to deal with this in Texo? Like setting a parameter to not merge this object, but persist
> it instead (this might be more of an EclipseLink question). Otherwise my approach would be to send back a warning to
> inform the user.
> Best regards
> Bastian
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
|
|
|
|
Powered by
FUDForum. Page generated in 0.09142 seconds