Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.Transaction.rollback()


    txn.commit();
  }

  public void rollbackTransaction() {
    Transaction txn = ds.getCurrentTransaction();
    txn.rollback();
  }
 
  public void delete(Object obj){
    List<Key> keys = new ArrayList<Key>();
   
View Full Code Here


      try {
        key = datastore.put(entity);
        txn.commit();
      } finally {
        if (txn.isActive())
          txn.rollback();
        else {
          addToCache(key, entity);
        }
      }
      return key;
View Full Code Here

    //{
        //tx.rollback();
      if (!suc)
           try{
     
           trans.rollback();
      }catch (Exception e2){
        tools.util.LogMgr.err("JGU.put TABLE.rollback " + e2.toString());
      }

    //}
View Full Code Here

    //if (tx.isActive())
    //{
        //tx.rollback();
      if (!suc)try{
     
           trans.rollback();
      }catch (Exception e){
        tools.util.LogMgr.err("JGU.delete TABLE.rollback " + e.toString());
      }

    //}
View Full Code Here

        }

        //trans.commit();
        }catch (Exception e){
          if (trans != null)
          trans.rollback();
          e.printStackTrace();
          ///(e);
          throw new SQLException(e.toString());
        }
 
View Full Code Here

        try{
       
        removeTableInfo(t,trans);
        trans.commit();
        }catch (Exception e){
          trans.rollback();
          throw new SQLException(e.toString());
        }     

        }
        StringBuffer itb = new StringBuffer( "jiqlAutoIncrementInt_").append(t);
View Full Code Here

        try {
            this.datastoreService.put(txn, featureEntity);
            txn.commit();
        } finally {
            if (txn.isActive()) {
                txn.rollback();
            }
        }
    }

    /**
 
View Full Code Here

        try {
            featureEntity = this.datastoreService.get(txn, key);
            txn.commit();
        } finally {
            if (txn.isActive()) {
                txn.rollback();
            }
        }
        return featureEntity;
    }
View Full Code Here

      entity.setProperty(DEVICE_REG_ID_PROPERTY, regId);
      datastore.put(entity);
      txn.commit();
    } finally {
      if (txn.isActive()) {
        txn.rollback();
      }
    }
  }

  /**
 
View Full Code Here

        datastore.delete(key);
      }
      txn.commit();
    } finally {
      if (txn.isActive()) {
        txn.rollback();
      }
    }
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.