mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
118714 arebegea: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 118652 cturlica: Merged V4.2-BUG-FIX (4.2.6) to 5.0.N (5.0.4) 118603 amukha: Merged V4.2.3 (4.2.3.21) to V4.2-BUG-FIX (4.2.6) 117952 adragoi: MNT-15169 : Receiving error when bulk deleting content in Share - moved deletion in a retrying context git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123594 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -63,6 +63,7 @@ import org.alfresco.repo.thumbnail.ThumbnailHelper;
|
||||
import org.alfresco.repo.thumbnail.ThumbnailRegistry;
|
||||
import org.alfresco.repo.thumbnail.script.ScriptThumbnail;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.version.VersionModel;
|
||||
import org.alfresco.repo.workflow.jscript.JscriptWorkflowInstance;
|
||||
import org.alfresco.scripts.ScriptException;
|
||||
@@ -2012,7 +2013,16 @@ public class ScriptNode implements Scopeable, NamespacePrefixResolverProvider
|
||||
|
||||
if (nodeService.exists(this.nodeRef))
|
||||
{
|
||||
this.nodeService.deleteNode(this.nodeRef);
|
||||
RetryingTransactionCallback<Void> deleteNode = new RetryingTransactionCallback<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
nodeService.deleteNode(nodeRef);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
services.getTransactionService().getRetryingTransactionHelper().doInTransaction(deleteNode, false, true);
|
||||
success = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user