Merged V3.0 to HEAD

12185: Fix 3.0 SP1 installation on non-Oracle databases. Removed creation of indexes in AlfrescoPostCreate-2.2-MappedFKIndexes.sql that were also in AlfrescoPostCreate-2.2-Extra.sql
  12186: Performance improvements to HibernateNodeDaoServiceImpl
  12188: Multi user tests: enable graceful web script recovery on optimistic locking failure (...)
  12191: Improve Javascript execution performance in Web Scripts & Improve error presentation (...) thrown by JavaScript
  12192: Share performance improvements: stop AbstractFeedGenerator from 'choking' the repository with too many web script requests
  12193: Multi user testing: don't suppress all exceptions during Wiki Move.
  12194: Multi user testing. Don't suppress all runtime exceptions in script site node object.
  12195: Multi user testing. Convert User bean object to use a retrying transaction so that optimistic locking failures are handled.
  12196: Multi user testing: Configuration changes to support concurrent access by 20 users


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12522 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-12-19 17:44:01 +00:00
parent c239ff31bb
commit 6a58dd6b97
3 changed files with 36 additions and 33 deletions

View File

@@ -42,34 +42,27 @@ function main()
}
// Finally, now we can do what we are supposed to do
try
var currentName = new String(page.name);
page.name = newName;
page.properties["cm:title"] = new String(newName).replace(/_/g, " ");
page.save();
var placeholder = createWikiPage(currentName, wiki,
{
var currentName = new String(page.name);
content: "This page has been moved [[" + newName + "|here]]."
});
page.name = newName;
page.properties["cm:title"] = new String(newName).replace(/_/g, " ");
page.save();
var placeholder = createWikiPage(currentName, wiki,
{
content: "This page has been moved [[" + newName + "|here]]."
});
var data =
{
title: newName.replace(/_/g, " "),
page: json.get("page") + "?title=" + newName,
custom0: currentName.replace(/_/g, " ")
}
activities.postActivity("org.alfresco.wiki.page-renamed", params.siteId, "wiki", jsonUtils.toJSONString(data));
return {
name: newName // Return the new name to the client (?)
}
var data =
{
title: newName.replace(/_/g, " "),
page: json.get("page") + "?title=" + newName,
custom0: currentName.replace(/_/g, " ")
}
catch (e)
{
return jsonError(e.toString());
activities.postActivity("org.alfresco.wiki.page-renamed", params.siteId, "wiki", jsonUtils.toJSONString(data));
return {
name: newName // Return the new name to the client (?)
}
}

View File

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

View File

@@ -163,16 +163,24 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
return params;
}
/* (non-Javadoc)
/*
* (non-Javadoc)
* @see org.alfresco.web.scripts.AbstractRuntimeContainer#getTemplateParameters()
*/
public Map<String, Object> getTemplateParameters()
{
Map<String, Object> params = new HashMap<String, Object>();
params.putAll(super.getTemplateParameters());
params.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver.getImageResolver());
addRepoParameters(params);
return params;
// This must be in an isolated read-only transaction, in case we are handling failure of another transaction
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Map<String, Object>>()
{
public Map<String, Object> execute() throws Throwable
{
Map<String, Object> params = new HashMap<String, Object>();
params.putAll(RepositoryContainer.super.getTemplateParameters());
params.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver.getImageResolver());
addRepoParameters(params);
return params;
}
}, true, true);
}
/**