1 |
package dk.thoerup.traininfoservice; |
package dk.thoerup.traininfoservice; |
2 |
|
|
3 |
|
import java.util.logging.Logger; |
4 |
|
|
5 |
import javax.servlet.ServletContext; |
import javax.servlet.ServletContext; |
6 |
|
|
7 |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
12 |
|
|
13 |
public class TraininfoSettings implements BreakerConfig{ |
public class TraininfoSettings implements BreakerConfig{ |
14 |
|
|
15 |
|
Logger logger = Logger.getLogger(TraininfoSettings.class.getName() ); |
16 |
|
|
17 |
ServletContext cxt; |
ServletContext cxt; |
18 |
public TraininfoSettings(ServletContext cxt) { |
public TraininfoSettings(ServletContext cxt) { |
19 |
this.cxt = cxt; |
this.cxt = cxt; |
39 |
|
|
40 |
@ReloadConfig |
@ReloadConfig |
41 |
public void reloadConfig() { |
public void reloadConfig() { |
42 |
System.out.println("Reloading config"); |
logger.info("Reloading config"); |
43 |
new ContextConfigLoader(cxt).loadConfig(this); |
new ContextConfigLoader(cxt).loadConfig(this); |
44 |
} |
} |
45 |
|
|