Exemple #1
0
 public ResourceHolder getResource() {
   TransactionState txState = transactionManager.getTransactionState();
   ResourceHolder resource = txState.getNeoStoreTransaction();
   if (resource == null) {
     txState.setNeoStoreTransaction(resource = createResource(getCurrentTransaction()));
   }
   return resource;
 }
Exemple #2
0
 @Override
 public void afterCompletion(int param) {
   releaseConnections(tx);
   if (param == Status.STATUS_COMMITTED) {
     state.commit();
   } else {
     state.rollback();
   }
   try {
     resourceHolder.resource.kernelTransaction().release();
   } catch (ReleaseLocksFailedKernelException e) {
     msgLog.error("Error releasing resources for " + tx, e);
   }
 }
Exemple #3
0
 void releaseResourceConnectionsForTransaction(Transaction tx, TransactionState state)
     throws NotInTransactionException {
   ResourceHolder resource = state.getNeoStoreTransaction();
   if (resource != null) {
     resource.destroy();
   }
 }
 public void updateFirstRelationships() {
   for (RecordProxy<Long, NodeRecord, Void> change : recordChangeSet.getNodeRecords().changes()) {
     NodeRecord record = change.forReadingLinkage();
     txState.setFirstIds(record.getId(), record.getNextRel(), record.getNextProp());
   }
 }
 public void commitCows() {
   txState.commitCows();
 }
 public void bind(TransactionState txState) {
   this.txState = txState;
   locker.setLockClient(txState.locks());
 }
 public void grab(LockManager lockManager, TransactionState state, Object entity) {
   state.acquireWriteLock(entity);
 }