google app engine - how to retry/recover from a java.sql.SQLexception: Concurrent Modification -
Using JDO on GAO, I am using a simple database transaction code block as below.
Is there a good way to try again - throws java.sql.SQLException: concurrent amendment?
Private Ultimate Provider pmp; ...
Persistence Manager pm = pmp.get (); Try {pm.currentTransaction (). Start ();
MyObject myObject = pm.getObjectById (MyObject.class, id);
pm.currentTransaction (). Commit ();
} Finally {
if (pm.currentTransaction () .isActive ()) {log .severe (this.getClass (). GetName () + "database exception caught up . "); Pm.currentTransaction () rollback () .; }}
Has that exception actually been thrown away? Are you sure about the words of Committed () and Active ()?
My second assumption is that this is a singleton bean used together and all of them in the same transaction, with the other questions, finally their requested object.
Comments
Post a Comment