A little bit of defensive programming I left out.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4621 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-12-15 17:41:38 +00:00
parent 51f300cfbe
commit fdb092052e
2 changed files with 9 additions and 0 deletions

View File

@@ -134,6 +134,11 @@ public class RetryingTransactionAdvice implements MethodInterceptor
} }
break; break;
} }
// Apparently java.lang.Throwable default the cause as 'this'.
if (t == t.getCause())
{
break;
}
t = t.getCause(); t = t.getCause();
} }
if (shouldRetry) if (shouldRetry)

View File

@@ -183,6 +183,10 @@ public class RetryingTransactionHelper
} }
break; break;
} }
if (t == t.getCause())
{
break;
}
t = t.getCause(); t = t.getCause();
} }
if (shouldRetry) if (shouldRetry)