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
This commit is contained in:
Derek Hulley
2007-01-03 14:46:21 +00:00
parent e7c69e86d0
commit db240fef48

View File

@@ -443,13 +443,12 @@ public class ImporterBootstrap extends AbstractLifecycleBean
catch(Throwable e) catch(Throwable e)
{ {
// rollback the transaction // rollback the transaction
try { if (userTransaction != null) {userTransaction.rollback();} } catch (Exception ex) {} try { if (userTransaction != null) {userTransaction.rollback();} } catch (Throwable ex) {}
try {authenticationComponent.clearCurrentSecurityContext(); } catch (Exception ex) {}
throw new AlfrescoRuntimeException("Bootstrap failed", e); throw new AlfrescoRuntimeException("Bootstrap failed", e);
} }
finally finally
{ {
authenticationComponent.clearCurrentSecurityContext(); try {authenticationComponent.clearCurrentSecurityContext(); } catch (Throwable ex) {}
} }
} }