Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10398
Modified Files:
RetryAdvice.cs
Log Message:
add trace level logging to retry advice when retrying method invocation.
Index: RetryAdvice.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** RetryAdvice.cs 10 Oct 2007 17:10:51 -0000 1.3
--- RetryAdvice.cs 29 Jan 2008 18:27:37 -0000 1.4
***************
*** 128,149 ****
int numAttempts = 0;
- /*
- Exception failureException;
- do
- {
- numAttempts++;
- try
- {
- return invocation.Proceed();
- }
- catch (Exception ex)
- {
- failureException = ex;
- }
- } while (numAttempts <= this.maxRetries);
- throw failureException;
- */
-
-
object returnVal = null;
do
--- 128,131 ----
***************
*** 166,169 ****
--- 148,155 ----
else
{
+ if (log.IsTraceEnabled)
+ {
+ log.Trace("Retrying " + invocation.Method.Name);
+ }
callContextDictionary["n"] = numAttempts;
Sleep(retryExceptionHandler, callContextDictionary);
***************
*** 178,182 ****
}
! private void Sleep(RetryExceptionHandler handler, IDictionary callContextDictionary)
{
if (handler.IsDelayBased)
--- 164,168 ----
}
! private static void Sleep(RetryExceptionHandler handler, IDictionary callContextDictionary)
{
if (handler.IsDelayBased)
|