class XOTransactionImpl implements XOTransaction {

    @Override
    public void commit() {
        if (rollbackOnly) {
            throw new XOException("Transaction is marked as rollback only.");
        }
        beforeCompletion();
        boolean committed = false;
        try {
            datastoreTransaction.commit();
            committed = true;
        } finally {
            afterCompletion(committed);
        }
    }

    public  XOTransactionImpl(DatastoreTransaction datastoreTransaction);

}