use of com.google.appengine.api.datastore.Transaction in project qi4j-sdk by Qi4j.
the class GaeEntityStoreMixin method applyChanges.
@Override
public void applyChanges(MapChanges changes) throws IOException {
final Transaction transaction = datastore.beginTransaction();
try {
changes.visitMap(new GaeMapChanger(transaction));
transaction.commit();
} catch (RuntimeException e) {
if (transaction.isActive()) {
transaction.rollback();
}
if (e instanceof EntityStoreException) {
throw (EntityStoreException) e;
} else {
throw new IOException(e);
}
}
}
use of com.google.appengine.api.datastore.Transaction in project siena by mandubian.
the class GaePersistenceManager method commitTransaction.
public void commitTransaction() {
Transaction txn = ds.getCurrentTransaction();
txn.commit();
}
use of com.google.appengine.api.datastore.Transaction in project siena by mandubian.
the class GaePersistenceManager method rollbackTransaction.
public void rollbackTransaction() {
Transaction txn = ds.getCurrentTransaction();
txn.rollback();
}
Aggregations