Exemplo n.º 1
0
 public override KernelTransaction BeginTransaction(KernelTransaction.Type type, LoginContext ignored, long timeout)
 {
     try
     {
         _availability.assertDatabaseAvailable();
         KernelTransaction kernelTx = _sourceModule.kernelAPI.get().beginTransaction(type, this._securityContext, timeout);
         kernelTx.RegisterCloseListener(txId => _threadToTransactionBridge.unbindTransactionFromCurrentThread());
         _threadToTransactionBridge.bindTransactionToCurrentThread(kernelTx);
         return(kernelTx);
     }
     catch (TransactionFailureException e)
     {
         throw new Org.Neo4j.Graphdb.TransactionFailureException(e.Message, e);
     }
 }