mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user