From db240fef48000269e630a6ab80e355f2a53122f4 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Wed, 3 Jan 2007 14:46:21 +0000 Subject: [PATCH] More robust handling of transaction and authentication exceptions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4711 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../java/org/alfresco/repo/importer/ImporterBootstrap.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java index 60f8e1fcba..9b4e1b6eb3 100644 --- a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java +++ b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java @@ -443,13 +443,12 @@ public class ImporterBootstrap extends AbstractLifecycleBean catch(Throwable e) { // rollback the transaction - try { if (userTransaction != null) {userTransaction.rollback();} } catch (Exception ex) {} - try {authenticationComponent.clearCurrentSecurityContext(); } catch (Exception ex) {} + try { if (userTransaction != null) {userTransaction.rollback();} } catch (Throwable ex) {} throw new AlfrescoRuntimeException("Bootstrap failed", e); } finally { - authenticationComponent.clearCurrentSecurityContext(); + try {authenticationComponent.clearCurrentSecurityContext(); } catch (Throwable ex) {} } }