Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

99764: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud)
      99695: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2)
         99553: MNT-12628: Following on from MNT-12501 - Rollback of synchronous transactions is not behaving consistently
            - Added a static variable holding the RollbackOnly state to RetryingTransactionHelper. Currently used by RetryingTransactionInterceptor.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@100491 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-03-27 22:56:07 +00:00
parent 18dc4fac29
commit 783c24a2a5
3 changed files with 97 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -80,11 +80,13 @@ public class RetryingTransactionInterceptor extends TransactionAspectSupport imp
}
catch (RuntimeException e)
{
RetryingTransactionHelper.setRollbackOnly();
completeTransactionAfterThrowing(txInfo, e);
throw e;
}
catch (Throwable e)
{
RetryingTransactionHelper.setRollbackOnly();
// Wrap non-runtime exceptions so that they can be preserved
completeTransactionAfterThrowing(txInfo, e);
throw new WrapperException(e);