diff --git a/config/alfresco/web-scripts-application-context-test.xml b/config/alfresco/web-scripts-application-context-test.xml
index c44792d9a8..3511494ec6 100644
--- a/config/alfresco/web-scripts-application-context-test.xml
+++ b/config/alfresco/web-scripts-application-context-test.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml
index ac61906acb..d4ec3d9e94 100644
--- a/config/alfresco/web-scripts-application-context.xml
+++ b/config/alfresco/web-scripts-application-context.xml
@@ -56,7 +56,7 @@
-
+
diff --git a/source/java/org/alfresco/web/scripts/TestWebScriptServer.java b/source/java/org/alfresco/web/scripts/TestWebScriptServer.java
index d85bf3893a..7c1137a569 100644
--- a/source/java/org/alfresco/web/scripts/TestWebScriptServer.java
+++ b/source/java/org/alfresco/web/scripts/TestWebScriptServer.java
@@ -40,10 +40,10 @@ import org.alfresco.config.ConfigService;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
-import org.alfresco.repo.transaction.TransactionUtil;
+import org.alfresco.repo.transaction.RetryingTransactionHelper;
+import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.security.AuthenticationService;
import org.alfresco.service.cmr.security.AuthorityService;
-import org.alfresco.service.transaction.TransactionService;
import org.alfresco.web.config.ServerConfigElement;
import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource;
@@ -62,7 +62,7 @@ public class TestWebScriptServer
{
// dependencies
protected AuthenticationService authenticationService;
- protected TransactionService transactionService;
+ protected RetryingTransactionHelper retryingTransactionHelper;
protected AuthorityService authorityService;
protected DeclarativeWebScriptRegistry registry;
protected ConfigService configService;
@@ -87,13 +87,11 @@ public class TestWebScriptServer
/**
- * Sets the transaction service
- *
- * @param transactionService
+ * Sets helper that provides transaction callbacks
*/
- public void setTransactionService(TransactionService transactionService)
+ public void setTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
{
- this.transactionService = transactionService;
+ this.retryingTransactionHelper = retryingTransactionHelper;
}
/**
@@ -213,7 +211,7 @@ public class TestWebScriptServer
MockHttpServletRequest req = createRequest(method, uri);
MockHttpServletResponse res = new MockHttpServletResponse();
- WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authorityService, null, req, res, serverConfig);
+ WebScriptRuntime runtime = new WebScriptServletRuntime(registry, retryingTransactionHelper, authorityService, null, req, res, serverConfig);
runtime.executeScript();
return res;
@@ -238,7 +236,7 @@ public class TestWebScriptServer
}
MockHttpServletResponse res = new MockHttpServletResponse();
- WebScriptRuntime runtime = new WebScriptServletRuntime(registry, transactionService, authorityService, null, req, res, serverConfig);
+ WebScriptRuntime runtime = new WebScriptServletRuntime(registry, retryingTransactionHelper, authorityService, null, req, res, serverConfig);
runtime.executeScript();
return res;
@@ -291,9 +289,9 @@ public class TestWebScriptServer
{
try
{
- TransactionUtil.executeInUserTransaction(transactionService, new TransactionUtil.TransactionWork