mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
deployment service: implementation of long timeout
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23018 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1880,7 +1880,6 @@ public class DeploymentServiceImpl implements DeploymentService
|
|||||||
{
|
{
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1891,13 +1890,21 @@ public class DeploymentServiceImpl implements DeploymentService
|
|||||||
@Override
|
@Override
|
||||||
public boolean isActive()
|
public boolean isActive()
|
||||||
{
|
{
|
||||||
|
Date now = new Date();
|
||||||
|
|
||||||
|
synchronized(this)
|
||||||
|
{
|
||||||
|
if(now.getTime() > lastActive.getTime() + targetLockTimeToLive)
|
||||||
|
{
|
||||||
|
active = false;
|
||||||
|
}
|
||||||
|
|
||||||
// may need to sync active flag
|
// may need to sync active flag
|
||||||
if(fgLogger.isDebugEnabled())
|
if(fgLogger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
fgLogger.debug("deployment service callback active: " + active);
|
fgLogger.debug("deployment service callback active: " + active);
|
||||||
}
|
}
|
||||||
synchronized(this)
|
|
||||||
{
|
|
||||||
return active;
|
return active;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user