Using JDO on GAE, I'm using a simple database transaction code block like below.
What is a good way to retry/recover from a thrown java.sql.SQLException: Concurrent Modification?
private final Provider pmp; ...
PersistenceManager pm = pmp.get(); try { pm.currentTransaction().begin();
MyObject myObject= pm.getObjectById(MyObject.class, id);
pm.currentTransaction().commit();
} finally {
if (pm.currentTransaction().isActive()) { log.severe( this.getClass().getName() + " caught DATABASE exception."); pm.currentTransaction().rollback(); } }