From 560582488686f2a5bf78578ccb52cf2ee0e875fa Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Mon, 30 Oct 2017 11:49:48 -0400 Subject: [PATCH] Minor fixes. --- src/main/java/net/helenus/core/AbstractUnitOfWork.java | 8 +++++--- src/main/java/net/helenus/core/HelenusSession.java | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/helenus/core/AbstractUnitOfWork.java b/src/main/java/net/helenus/core/AbstractUnitOfWork.java index fa09f30..6e77501 100644 --- a/src/main/java/net/helenus/core/AbstractUnitOfWork.java +++ b/src/main/java/net/helenus/core/AbstractUnitOfWork.java @@ -256,7 +256,7 @@ public abstract class AbstractUnitOfWork implements UnitOfW } } - // log.recordCacheAndDatabaseOperationCount(txn::provisionalCommit) + // log.record(txn::provisionalCommit) // examine log for conflicts in read-set and write-set between begin and // provisional commit // if (conflict) { throw new ConflictingUnitOfWorkException(this) } @@ -310,12 +310,14 @@ public abstract class AbstractUnitOfWork implements UnitOfW public synchronized void abort() { TreeTraverser> traverser = TreeTraverser.using(node -> node::getChildNodes); traverser.postOrderTraversal(this).forEach(uow -> { - uow.committed = false; - uow.aborted = true; + uow.committed = false; + uow.aborted = true; }); // log.record(txn::abort) // cache.invalidateSince(txn::start time) if (!hasAborted()) { + committed = false; + aborted = true; elapsedTime.stop(); if (LOG.isInfoEnabled()) { LOG.info(logTimers("aborted")); diff --git a/src/main/java/net/helenus/core/HelenusSession.java b/src/main/java/net/helenus/core/HelenusSession.java index 6b33f60..dfd2ffe 100644 --- a/src/main/java/net/helenus/core/HelenusSession.java +++ b/src/main/java/net/helenus/core/HelenusSession.java @@ -321,6 +321,8 @@ public final class HelenusSession extends AbstractSessionOperations implements C int frame = 2; if (trace[2].getMethodName().equals("begin")) { frame = 3; + } else if (trace[2].getClassName().equals(unitOfWorkClass.getName())) { + frame = 3; } purpose = new StringBuilder().append(trace[frame].getClassName()).append(".") .append(trace[frame].getMethodName()).append("(").append(trace[frame].getFileName()).append(":")