Tidy up of UserTransaction roll back on throwable as opposed to Exception

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2218 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2006-01-26 15:38:58 +00:00
parent 90d70c6794
commit aa831ddd85
3 changed files with 76 additions and 29 deletions

View File

@@ -40,6 +40,8 @@ import org.alfresco.service.transaction.TransactionService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sun.star.uno.RuntimeException;
/**
* Alfresco Authenticator Class
*
@@ -351,7 +353,7 @@ public class AlfrescoAuthenticator extends SrvAuthenticator
client.setHomeFolder( homeSpaceRef);
tx.commit();
}
catch (Exception ex)
catch (Throwable ex)
{
try
{
@@ -359,7 +361,16 @@ public class AlfrescoAuthenticator extends SrvAuthenticator
}
catch (Exception ex2)
{
logger.error("Failed to rollback transaction", ex);
logger.error("Failed to rollback transaction", ex2);
}
if(ex instanceof RuntimeException)
{
throw (RuntimeException)ex;
}
else
{
throw new RuntimeException("Failed to get home folder", ex);
}
}
}