diff --git a/extensions/persist/src/com/google/inject/persist/jpa/JpaLocalTxnInterceptor.java b/extensions/persist/src/com/google/inject/persist/jpa/JpaLocalTxnInterceptor.java index 61d2dcb748..bb3f465272 100644 --- a/extensions/persist/src/com/google/inject/persist/jpa/JpaLocalTxnInterceptor.java +++ b/extensions/persist/src/com/google/inject/persist/jpa/JpaLocalTxnInterceptor.java @@ -48,7 +48,11 @@ public Object invoke(MethodInvocation methodInvocation) throws Throwable { // Allow 'joining' of transactions if there is an enclosing @Transactional method. if (em.getTransaction().isActive()) { - return methodInvocation.proceed(); + try { + return methodInvocation.proceed(); + } finally { + unitOfWorkHandler.endRequireUnitOfWork(); + } } final EntityTransaction txn = em.getTransaction();