I am using the Eclipse plugin for Google App Engine 1.2.6 and Web Toolkit 1.7.1 DataNucleus/JDO is driving me mad! I suspect either my creates are silently erroring out before being written AND/OR the reads are inconsistently populating the objects.
I could use some tips on figuring out what is really happening.
- Using a minimally unmodified GAE project, where is the log written by the dn enhancer?
- Is there a log written by the datastore code?
Is there anyway to inspect the contents local_db.bin file?
Using the basic JDO transaction syntax below, how do I understand the error/exception without disturbing the builtin error handing mechanism?
TIA, Andy
private final Provider<PersistenceManager> pmp;
private PersistenceManager pm;
MyResult result; // results from handler, usually has object id or error message
try {
pm = pmp.get();
pm.currentTransaction().begin();
/* validate, fetch, create/update persistent myObject */
pm.currentTransaction().commit();
result = new MyResult( myObject.getId() );
} finally {
if (pm.currentTransaction().isActive()) {
logger.severe("DN fails...");
pm.currentTransaction().rollback();
result = new MyResult( "error message why failed" );
}
}
return (result);