mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-4898 - rework to deployment locks to implement Job Lock Service timeout callback.
- there is now two callbacks. A short timeout (1 minute) for keeping the lock alive and a longer lock for timing out the whole deployment. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22961 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -75,6 +75,17 @@
|
|||||||
<value>${deployment.service.numberOfSendingThreads}</value>
|
<value>${deployment.service.numberOfSendingThreads}</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<!-- Short timeout, to detect a shutdown server -->
|
||||||
|
<property name="targetLockRefreshTime">
|
||||||
|
<value>${deployment.service.targetLockRefreshTime}</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!-- Long timeout, how long to wait for the next step in the deployment process, may need to be fairly
|
||||||
|
long to cope with large transfers over slow networks -->
|
||||||
|
<property name="targetLockTimeToLive">
|
||||||
|
<value>${deployment.service.targetLockTimeout}</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
<!-- Which adapters are provided to communicate with remote File System Receivers -->
|
<!-- Which adapters are provided to communicate with remote File System Receivers -->
|
||||||
<property name="deploymentReceiverTransportAdapters">
|
<property name="deploymentReceiverTransportAdapters">
|
||||||
<map>
|
<map>
|
||||||
|
@@ -499,6 +499,12 @@ deployment.service.numberOfSendingThreads=5
|
|||||||
deployment.service.corePoolSize=2
|
deployment.service.corePoolSize=2
|
||||||
deployment.service.maximumPoolSize=3
|
deployment.service.maximumPoolSize=3
|
||||||
|
|
||||||
|
# How long to wait in mS before refreshing a target lock - detects shutdown servers
|
||||||
|
deployment.service.targetLockRefreshTime=60000
|
||||||
|
# How long to wait in mS from the last communication before deciding that deployment has failed, possibly
|
||||||
|
# the destination is no longer available?
|
||||||
|
deployment.service.targetLockTimeout=3600000
|
||||||
|
|
||||||
# Transfer Service
|
# Transfer Service
|
||||||
transferservice.receiver.enabled=true
|
transferservice.receiver.enabled=true
|
||||||
transferservice.receiver.stagingDir=${java.io.tmpdir}/alfresco-transfer-staging
|
transferservice.receiver.stagingDir=${java.io.tmpdir}/alfresco-transfer-staging
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,8 @@ import org.alfresco.service.cmr.avm.deploy.DeploymentService;
|
|||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.util.Deleter;
|
import org.alfresco.util.Deleter;
|
||||||
import org.alfresco.util.NameMatcher;
|
import org.alfresco.util.NameMatcher;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.context.support.FileSystemXmlApplicationContext;
|
import org.springframework.context.support.FileSystemXmlApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +49,7 @@ import org.springframework.context.support.FileSystemXmlApplicationContext;
|
|||||||
* @author britt
|
* @author britt
|
||||||
* @author mrogers
|
* @author mrogers
|
||||||
*/
|
*/
|
||||||
public class FSDeploymentTest extends AVMServiceTestBase
|
public class DeploymentServiceImplFSTest extends AVMServiceTestBase
|
||||||
{
|
{
|
||||||
private File log = null;
|
private File log = null;
|
||||||
private File metadata = null;
|
private File metadata = null;
|
||||||
@@ -60,6 +62,8 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
|
|
||||||
DeploymentService service = null;
|
DeploymentService service = null;
|
||||||
|
|
||||||
|
private static Log logger = LogFactory.getLog(DeploymentServiceImplFSTest.class);
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception
|
protected void setUp() throws Exception
|
||||||
@@ -410,6 +414,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
*/
|
*/
|
||||||
public void testWrongPassword()
|
public void testWrongPassword()
|
||||||
{
|
{
|
||||||
|
logger.debug("Start testWrongPassword");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
service.deployDifferenceFS(-1, "main:/", "default", "localhost", 44100, TEST_USER, "Wrong!", TEST_TARGET, null, false, false, false, null);
|
service.deployDifferenceFS(-1, "main:/", "default", "localhost", 44100, TEST_USER, "Wrong!", TEST_TARGET, null, false, false, false, null);
|
||||||
@@ -428,6 +433,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
*/
|
*/
|
||||||
public void testWrongTarget()
|
public void testWrongTarget()
|
||||||
{
|
{
|
||||||
|
logger.debug("Start testWrongTarget");
|
||||||
try {
|
try {
|
||||||
service.deployDifferenceFS(-1, "main:/", "default", "localhost", 44100, TEST_USER, TEST_PASSWORD, "crapTarget", null, false, false, false, null);
|
service.deployDifferenceFS(-1, "main:/", "default", "localhost", 44100, TEST_USER, TEST_PASSWORD, "crapTarget", null, false, false, false, null);
|
||||||
fail("Wrong target should have thrown an exception");
|
fail("Wrong target should have thrown an exception");
|
||||||
@@ -443,6 +449,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
*/
|
*/
|
||||||
public void testNoExclusionFilter() throws Exception
|
public void testNoExclusionFilter() throws Exception
|
||||||
{
|
{
|
||||||
|
logger.debug("Start testNoExclusionFilter");
|
||||||
DeploymentReport report = new DeploymentReport();
|
DeploymentReport report = new DeploymentReport();
|
||||||
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
||||||
callbacks.add(new DeploymentReportCallback(report));
|
callbacks.add(new DeploymentReportCallback(report));
|
||||||
@@ -471,6 +478,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
*/
|
*/
|
||||||
public void testRevertToPreviousVersion() throws Exception
|
public void testRevertToPreviousVersion() throws Exception
|
||||||
{
|
{
|
||||||
|
logger.debug("Start testRevertToPreviousVersion");
|
||||||
DeploymentReport report = new DeploymentReport();
|
DeploymentReport report = new DeploymentReport();
|
||||||
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
||||||
callbacks.add(new DeploymentReportCallback(report));
|
callbacks.add(new DeploymentReportCallback(report));
|
||||||
@@ -527,6 +535,7 @@ public class FSDeploymentTest extends AVMServiceTestBase
|
|||||||
*/
|
*/
|
||||||
public void testBulkLoad() throws Exception
|
public void testBulkLoad() throws Exception
|
||||||
{
|
{
|
||||||
|
logger.debug("Start testBulkLoad");
|
||||||
DeploymentReport report = new DeploymentReport();
|
DeploymentReport report = new DeploymentReport();
|
||||||
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
List<DeploymentCallback> callbacks = new ArrayList<DeploymentCallback>();
|
||||||
callbacks.add(new DeploymentReportCallback(report));
|
callbacks.add(new DeploymentReportCallback(report));
|
Reference in New Issue
Block a user