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:
@@ -29,7 +29,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
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.ActionService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -461,10 +461,10 @@ public abstract class AbstractScheduledAction implements ScheduledActionDefiniti
|
||||
|
||||
try
|
||||
{
|
||||
TransactionUtil.executeInUserTransaction(abstractScheduledAction.getTransactionService(),
|
||||
new TransactionUtil.TransactionWork<Object>()
|
||||
abstractScheduledAction.getTransactionService().getRetryingTransactionHelper().doInTransaction(
|
||||
new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object execute() throws Exception
|
||||
{
|
||||
// Build the full list of compensating actions
|
||||
// If anything goes wrong we need to do all these instead
|
||||
@@ -561,10 +561,10 @@ public abstract class AbstractScheduledAction implements ScheduledActionDefiniti
|
||||
|
||||
try
|
||||
{
|
||||
TransactionUtil.executeInUserTransaction(abstractScheduledAction.getTransactionService(),
|
||||
new TransactionUtil.TransactionWork<Object>()
|
||||
abstractScheduledAction.getTransactionService().getRetryingTransactionHelper().doInTransaction(
|
||||
new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object execute() throws Exception
|
||||
{
|
||||
// try action - failure triggers compensation
|
||||
Action action = abstractScheduledAction.getAction(nodeRef);
|
||||
@@ -611,10 +611,10 @@ public abstract class AbstractScheduledAction implements ScheduledActionDefiniti
|
||||
|
||||
try
|
||||
{
|
||||
TransactionUtil.executeInUserTransaction(abstractScheduledAction.getTransactionService(),
|
||||
new TransactionUtil.TransactionWork<Object>()
|
||||
abstractScheduledAction.getTransactionService().getRetryingTransactionHelper().doInTransaction(
|
||||
new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
public Object execute() throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user