From 077804624eb7dc69899d1c7f045931f794501925 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 3 Sep 2007 03:13:59 +0000 Subject: Fixed transaction leak caused when calling update, if an update trigger exists, and no properties were dirty. --- src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/gen') diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java index 4bc5010..ea61306 100644 --- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java @@ -1320,6 +1320,16 @@ public final class StorableGenerator { // Even though there was no update, still need tryLoad side-effect. { + // if (txn != null) { + // txn.exit(); + // } + b.loadLocal(txnVar); + Label noTxn = b.createLabel(); + b.ifNullBranch(noTxn, true); + b.loadLocal(txnVar); + b.invokeInterface(transactionType, EXIT_METHOD_NAME, null, null); + noTxn.setLocation(); + Label tryStart2 = b.createLabel().setLocation(); b.loadThis(); b.invokeVirtual(DO_TRY_LOAD_METHOD_NAME, TypeDesc.BOOLEAN, null); -- cgit v1.2.3