method failed to update row
method failed to update row
- Subject: method failed to update row
- From: Wolfram Stebel <email@hidden>
- Date: Fri, 19 May 2006 22:02:24 +0200
- Thread-topic: method failed to update row
Hi List,
another problem i encounter today:
i have two WO applications running, one uses objects from a
sharedEditingContext for display only.
In one method of this appication i added the following:
...
EOEditingContext localEC = new EOEditingContext ();
localEC.setSharedEditingContext ( null );
// wcSponsor comes in a shared EC so get a modifyable copy in local EC
WCSponsor copiedSponsor = ( WCSponsor ) localEC.faultForGlobalID (
wcSponsor.editingContext ().globalIDForObject ( wcSponsor ), localEC );
Integer hc = ( Integer ) copiedSponsor.hit_count();
copiedSponsor.setHit_count ( new Integer ( hc != null ? hc.intValue () + 1 :
1 ) );
localEC.saveChanges ();
...
I get the following exception, when i try to save the same object from the
second application after the above code updated the database:
com.webobjects.eoaccess.EOGeneralAdaptorException:
updateValuesInRowDescribedByQualifier --
com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
database
As far as i can see, this is a standard concurrency problem.
Now i tried TolerantSaver from dneumann to get the data merged and saved.
But now i wonder, that this exception is not catched in there.
Is TolerantSaver the wrong solution?
What could i do instead?
Wolfram
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden