mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1100 (Uncaught LockAcquisitionException in RM 2.0.4)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.2.1.x@102242 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,8 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
@@ -39,6 +41,8 @@ import org.quartz.JobExecutionException;
|
||||
*/
|
||||
public class RecordsManagementJob implements Job
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(RecordsManagementJob.class);
|
||||
|
||||
private static final long DEFAULT_TIME = 30000L;
|
||||
|
||||
private JobLockService jobLockService;
|
||||
@@ -108,7 +112,18 @@ public class RecordsManagementJob implements Job
|
||||
}
|
||||
finally
|
||||
{
|
||||
jobLockService.releaseLock(lockToken, getLockQName());
|
||||
try
|
||||
{
|
||||
jobLockService.releaseLock(lockToken, getLockQName());
|
||||
}
|
||||
catch (LockAcquisitionException e)
|
||||
{
|
||||
// Ignore
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Lock release failed: " + getLockQName() + ": " + lockToken + "(" + e.getMessage() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user