protected TransactionRunner(GetOrCreateTransactionResult result) {
   txn = result.getTransaction();
   finishTxn = result.isNew();
   if (txn == null && finishTxn) {
     throw new IllegalArgumentException(
         "Cannot have a null txn when finishTxn is true.  This "
             + "almost certainly represents a programming error on the part of the App Engine team.  "
             + "Please report this via standard support channels and accept our humblest apologies.");
   }
   TransactionImpl.ensureTxnActive(txn);
 }