mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALFCOM-2422: Lazily retrieve the status template after a web script exception, outside the transaction retrying loop, thus avoiding nested transactions, potential deadlocks, and hanging problems on Derby
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12836 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -700,8 +700,6 @@ public class RepoStore implements Store, TenantDeployer
|
|||||||
{
|
{
|
||||||
public Object doWork() throws Exception
|
public Object doWork() throws Exception
|
||||||
{
|
{
|
||||||
// Run this in an isolated transaction to avoid flushing an uncommitted webscript transaction and
|
|
||||||
// causing deadlocks or trying to flush a 'dead' failed transaction
|
|
||||||
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Object>()
|
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Object>()
|
||||||
{
|
{
|
||||||
public Object execute() throws Exception
|
public Object execute() throws Exception
|
||||||
@@ -714,7 +712,7 @@ public class RepoStore implements Store, TenantDeployer
|
|||||||
}
|
}
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
}, true, true);
|
}, true);
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getSystemUserName());
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
}
|
}
|
||||||
|
@@ -169,7 +169,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
|||||||
*/
|
*/
|
||||||
public Map<String, Object> getTemplateParameters()
|
public Map<String, Object> getTemplateParameters()
|
||||||
{
|
{
|
||||||
// This must be in an isolated read-only transaction, in case we are handling failure of another transaction
|
// Ensure we have a transaction - we might be generating the status template after the main transaction failed
|
||||||
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Map<String, Object>>()
|
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Map<String, Object>>()
|
||||||
{
|
{
|
||||||
public Map<String, Object> execute() throws Throwable
|
public Map<String, Object> execute() throws Throwable
|
||||||
@@ -180,7 +180,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
|||||||
addRepoParameters(params);
|
addRepoParameters(params);
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
}, true, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user