--- android/TrainInfoService/src/dk/thoerup/traininfoservice/CircuitBreakerListener.java 2010/10/04 17:36:43 1161 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/CircuitBreakerListener.java 2010/10/04 17:38:13 1162 @@ -34,19 +34,18 @@ int timeout = Integer.parseInt( sce.getServletContext().getInitParameter("banedk_timeout") ); CircuitBreakerManager mgr = CircuitBreakerManager.getManager(); - - AccountingCircuitBreaker banedk = new AccountingCircuitBreaker("banedk", threshold, timeout); CompositeNotifier notif = new CompositeNotifier(); notif.addNotifier( new JavaLogNotifier() ); - notif.addNotifier( new MailNotifier(banedk,"traininfo@t-hoerup.dk", "torben@t-hoerup.dk", "192.168.10.5") ); + notif.addNotifier( new MailNotifier("traininfo@t-hoerup.dk", "torben@t-hoerup.dk", "192.168.10.5") ); + + + AccountingCircuitBreaker banedk = new AccountingCircuitBreaker("banedk", threshold, timeout); banedk.setNotifier(notif); mgr.addCircuitBreaker( banedk ); + AccountingCircuitBreaker metro = new AccountingCircuitBreaker("metro", threshold, timeout); - notif = new CompositeNotifier(); - notif.addNotifier( new JavaLogNotifier() ); - notif.addNotifier( new MailNotifier(banedk,"traininfo@t-hoerup.dk", "torben@t-hoerup.dk", "192.168.10.5") ); - banedk.setNotifier(notif); + metro.setNotifier(notif); mgr.addCircuitBreaker( metro ); JMXWrapper.registerAllCircuitBreakers();