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

97181: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud)
      97111: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2)
         97019: Merged V4.2.0 (4.2.0.11) to V4.2-BUG-FIX (4.2.5)
            92266: MNT-12936: Temporary GenericCertificateIntegrityException causes repo to go into readOnly
             - Retry transaction if got GenericCertificateIntegrityException 
            92373: MNT-12936: Temporary GenericCertificateIntegrityException causes repo to go into readOnly
             - Remove stale try{}catch{}, modify unit test.
            92842: MNT-12936: Temporary GenericCertificateIntegrityException causes repo to go into readOnly
             - Use exception from repo for retrying
            92899: MNT-12936: Temporary GenericCertificateIntegrityException causes repo to go into readOnly
             - Fix unit test failing: use new exception that was introduced in original fix 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@97196 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-02-17 10:02:44 +00:00
parent 41446700c7
commit 5d45c38a06
2 changed files with 41 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ import org.alfresco.error.ExceptionStackUtil;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport.TxnReadState;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.service.license.LicenseIntegrityException;
import org.alfresco.util.LockHelper.LockTryException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -59,6 +60,7 @@ import org.springframework.dao.DeadlockLoserDataAccessException;
import org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException;
import org.springframework.jdbc.UncategorizedSQLException;
/**
* A helper that runs a unit of work inside a UserTransaction,
* transparently retrying the unit of work if the cause of
@@ -104,6 +106,7 @@ public class RetryingTransactionHelper
SQLException.class,
BatchUpdateException.class,
DataIntegrityViolationException.class,
LicenseIntegrityException.class,
StaleStateException.class,
TooManyResultsException.class, // Expected one result but found multiple (bad key alert)
ObjectNotFoundException.class,