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:
Dave Ward
2009-01-16 17:55:54 +00:00
parent 533dee1800
commit dedef025d6
2 changed files with 3 additions and 5 deletions

View File

@@ -700,8 +700,6 @@ public class RepoStore implements Store, TenantDeployer
{
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>()
{
public Object execute() throws Exception
@@ -714,7 +712,7 @@ public class RepoStore implements Store, TenantDeployer
}
return source;
}
}, true, true);
}, true);
}
}, AuthenticationUtil.getSystemUserName());
}

View File

@@ -169,7 +169,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
*/
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>>()
{
public Map<String, Object> execute() throws Throwable
@@ -180,7 +180,7 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
addRepoParameters(params);
return params;
}
}, true, true);
}, true);
}
/**