Skip to content

Commit

Permalink
google#731 Fix nested Transactional annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
andresviedma committed Dec 31, 2015
1 parent 51215c3 commit 3a1d520
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3a1d520

Please sign in to comment.