From 3aa31d4ba2dd0b8a2c45a57878d3b5cb42d37aa0 Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Wed, 12 Feb 2014 15:01:09 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 61167: Removed in-txn exception absorbtion and replaced with a node exists check git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62397 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../node/archive/NodeArchiveServiceImpl.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/source/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java b/source/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java index 29f3cddd90..ecb8c5e497 100644 --- a/source/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java +++ b/source/java/org/alfresco/repo/node/archive/NodeArchiveServiceImpl.java @@ -489,19 +489,17 @@ public class NodeArchiveServiceImpl implements NodeArchiveService public void purgeArchivedNode(final NodeRef archivedNodeRef) { RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper(); - RetryingTransactionCallback deleteCallback = new RetryingTransactionCallback() + RetryingTransactionCallback deleteCallback = new RetryingTransactionCallback() { - public Object execute() throws Exception + public Void execute() throws Exception { - try + if (!nodeService.exists(archivedNodeRef)) { - invokeBeforePurgeNode(archivedNodeRef); - nodeService.deleteNode(archivedNodeRef); - } - catch (InvalidNodeRefException e) - { - // ignore + // Node has disappeared + return null; } + invokeBeforePurgeNode(archivedNodeRef); + nodeService.deleteNode(archivedNodeRef); return null; } };