From 189e0a2ea9412c21ed1c0c3e43fb4b582eb8c4c3 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Fri, 21 Mar 2014 21:54:47 +1300 Subject: [PATCH] Part of fix for #79 - moving deactivate() and notifyCommit() into finally block --- .../ebeaninternal/server/transaction/JdbcTransaction.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/avaje/ebeaninternal/server/transaction/JdbcTransaction.java b/src/main/java/com/avaje/ebeaninternal/server/transaction/JdbcTransaction.java index f066668f4..9d912e11d 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/transaction/JdbcTransaction.java +++ b/src/main/java/com/avaje/ebeaninternal/server/transaction/JdbcTransaction.java @@ -593,12 +593,14 @@ public class JdbcTransaction implements SpiTransaction { } connection.commit(); } - // these will not throw an exception - deactivate(); - notifyCommit(); } catch (Exception e) { throw new RollbackException(e); + + } finally { + // these will not throw an exception + deactivate(); + notifyCommit(); } }