mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed JobLockService refresh callback code
- Fallout from ALF-4898 - Unit tests perform and check callback counts git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -287,7 +287,7 @@ public class JobLockServiceImpl implements JobLockService
|
||||
// First check the VM
|
||||
if (shutdownListener.isVmShuttingDown())
|
||||
{
|
||||
callback.lockReleased();
|
||||
callLockReleased(callback);
|
||||
return;
|
||||
}
|
||||
boolean isActive = false;
|
||||
@@ -324,13 +324,13 @@ public class JobLockServiceImpl implements JobLockService
|
||||
try
|
||||
{
|
||||
releaseLock(lockToken, lockQName);
|
||||
// The callback must be informed as we released the lock automatically
|
||||
callLockReleased(callback);
|
||||
}
|
||||
catch (LockAcquisitionException e)
|
||||
{
|
||||
// The lock is already gone: job done
|
||||
}
|
||||
// The callback must be informed
|
||||
callLockReleased(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -338,6 +338,8 @@ public class JobLockServiceImpl implements JobLockService
|
||||
{
|
||||
refreshLock(lockToken, lockQName, timeToLive);
|
||||
// Success. The callback does not need to know.
|
||||
// NB: Reschedule this task
|
||||
scheduler.schedule(this, delay, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
catch (LockAcquisitionException e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user