Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (4.3/Cloud)

73348: Merged V4.2-BUG-FIX (4.2.3) to HEAD-BUG-FIX (4.3/Cloud)
      73162: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.3)
         73054: Added LockDAO.releaseLockQuiet and used it for the callback's precautionary lock release
          - Fixes MNT-11507: JobLockService automatic refresh is triggering a retry under normal conditions
          - Prevents a DEBUG message from RetryingTransactionInterceptor when the normal condition is for
            the lock to no longer exist


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@74766 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-06-25 15:58:39 +00:00
parent d7695471f8
commit 73d5ddfb3d
4 changed files with 66 additions and 9 deletions

View File

@@ -175,6 +175,22 @@ public abstract class AbstractLockDAOImpl implements LockDAO
return updateLocks(lockQName, lockToken, LOCK_TOKEN_RELEASED, 0L, optimistic);
}
@Override
public boolean releaseLockQuiet(QName lockQName, String lockToken)
{
try
{
updateLocks(lockQName, lockToken, LOCK_TOKEN_RELEASED, 0L, false);
// It worked
return true;
}
catch (LockAcquisitionException e)
{
// We absorb this
return false;
}
}
/**
* Put new values against the given exclusive lock. This works against the related locks as well.
* @param optimistic <tt>true</tt> if a mismatch in the number of locked rows should