7 |
import javax.servlet.annotation.WebListener; |
import javax.servlet.annotation.WebListener; |
8 |
|
|
9 |
import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; |
import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; |
10 |
|
import dk.thoerup.circuitbreaker.LoggingCircuitBreaker; |
11 |
import dk.thoerup.circuitbreaker.CircuitBreakerManager; |
import dk.thoerup.circuitbreaker.CircuitBreakerManager; |
12 |
import dk.thoerup.circuitbreaker.jmx.JMXWrapper; |
import dk.thoerup.circuitbreaker.jmx.JMXWrapper; |
13 |
import dk.thoerup.circuitbreaker.notification.*; |
import dk.thoerup.circuitbreaker.notification.*; |
40 |
notif.addNotifier( new MailNotifier("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") ); |
41 |
|
|
42 |
|
|
43 |
AccountingCircuitBreaker banedk = new AccountingCircuitBreaker("banedk", threshold, timeout); |
LoggingCircuitBreaker banedk = new LoggingCircuitBreaker("banedk", threshold, timeout); |
44 |
banedk.setNotifier(notif); |
banedk.setNotifier(notif); |
45 |
mgr.addCircuitBreaker( banedk ); |
mgr.addCircuitBreaker( banedk ); |
46 |
|
|