コード例 #1
0
  public TransactionCommand beginTx() {

    final DatabaseService graphDb = (DatabaseService) arguments.get("graphDb");
    TransactionReference tx = transactions.get();

    if (tx == null) {

      // start new transaction
      tx = new TransactionReference(graphDb.beginTx());

      queues.set(new ModificationQueue());
      buffers.set(new ErrorBuffer());
      transactions.set(tx);
      currentCommand.set(this);
    }

    // increase depth
    tx.begin();

    return this;
  }