/[projects]/CircuitBreaker/src/dk/thoerup/curcuitbreaker/CircuitBreaker.java
ViewVC logotype

Diff of /CircuitBreaker/src/dk/thoerup/curcuitbreaker/CircuitBreaker.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 447 by torben, Mon Oct 19 13:57:42 2009 UTC revision 452 by torben, Tue Oct 20 10:47:36 2009 UTC
# Line 31  import dk.thoerup.curcuitbreaker.notific Line 31  import dk.thoerup.curcuitbreaker.notific
31                  try {                  try {
32                          String s = (String) cb.invoke(new TestInvocation("http://rafiki/test"));                          String s = (String) cb.invoke(new TestInvocation("http://rafiki/test"));
33                          response.getWriter().print(s);                          response.getWriter().print(s);
34                  } catch (Throwable e) {                  } catch (Exception e) {
35                          logger.warning( e.getMessage() );                          logger.warning( e.getMessage() );
36                          response.sendError(500);                          response.sendError(500);
37                          return;                          return;
# Line 63  public class CircuitBreaker{ Line 63  public class CircuitBreaker{
63          }          }
64                    
65                    
66      public Object invoke(CircuitInvocation invocation) throws Throwable      public Object invoke(CircuitInvocation invocation) throws Exception
67      {      {
68          Object result = null;          Object result = null;
69          try          try
# Line 72  public class CircuitBreaker{ Line 72  public class CircuitBreaker{
72              result = invocation.proceed();              result = invocation.proceed();
73              getState().postInvoke(this);              getState().postInvoke(this);
74          }          }
75          catch(Throwable t)          catch(Exception e)
76          {          {
77              getState().onError(this, t);              getState().onError(this, e);
78              throw t;              throw e;
79          }          }
80          return result;          return result;
81      }      }

Legend:
Removed from v.447  
changed lines
  Added in v.452

  ViewVC Help
Powered by ViewVC 1.1.20