mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
More for AR-460: System concurrency
There might be a few SDK projects that still use TransactionUtil, but this checkin gets rid of its use otherwise. I took a glance over the areas of the code that use UserTransaction directly and didn't see any transactionally wrapped code that desperately needed to be put into a retry loop (i.e. write transactions in a concurrent scenario). If you spot any that you think might qualify, let me know. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6220 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -42,7 +42,7 @@ import org.alfresco.repo.action.executer.CompositeActionExecuter;
|
||||
import org.alfresco.repo.action.executer.MoveActionExecuter;
|
||||
import org.alfresco.repo.action.executer.ScriptActionExecuter;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.transaction.TransactionUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ActionCondition;
|
||||
import org.alfresco.service.cmr.action.ActionConditionDefinition;
|
||||
@@ -810,11 +810,10 @@ public class ActionServiceImplTest extends BaseAlfrescoSpringTest
|
||||
// Sleep for a bit
|
||||
Thread.sleep(sleepTime);
|
||||
|
||||
done = (TransactionUtil.executeInUserTransaction(
|
||||
transactionService,
|
||||
new TransactionUtil.TransactionWork<Boolean>()
|
||||
done = (transactionService.getRetryingTransactionHelper().doInTransaction(
|
||||
new RetryingTransactionCallback<Boolean>()
|
||||
{
|
||||
public Boolean doWork()
|
||||
public Boolean execute()
|
||||
{
|
||||
// See if the action has been performed
|
||||
boolean done = test.executeTest();
|
||||
@@ -947,11 +946,10 @@ public class ActionServiceImplTest extends BaseAlfrescoSpringTest
|
||||
// Modify the compensating action so that it will also fail
|
||||
compensatingAction.setParameterValue(AddFeaturesActionExecuter.PARAM_ASPECT_NAME, QName.createQName("{test}badAspect"));
|
||||
|
||||
TransactionUtil.executeInUserTransaction(
|
||||
this.transactionService,
|
||||
new TransactionUtil.TransactionWork<Object>()
|
||||
this.transactionService.getRetryingTransactionHelper().doInTransaction(
|
||||
new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object doWork()
|
||||
public Object execute()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user