12 |
|
|
13 |
import org.apache.commons.lang3.SystemUtils; |
import org.apache.commons.lang3.SystemUtils; |
14 |
|
|
15 |
|
import com.jcabi.manifests.Manifests; |
16 |
|
import com.jcabi.manifests.ServletMfs; |
17 |
|
|
18 |
import dk.daoas.daoadresseservice.admin.ServiceConfig; |
import dk.daoas.daoadresseservice.admin.ServiceConfig; |
19 |
import dk.thoerup.circuitbreaker.CircuitBreaker; |
import dk.thoerup.circuitbreaker.CircuitBreaker; |
20 |
import dk.thoerup.circuitbreaker.CircuitBreakerManager; |
import dk.thoerup.circuitbreaker.CircuitBreakerManager; |
45 |
public void contextInitialized(ServletContextEvent ctxtEvt) { |
public void contextInitialized(ServletContextEvent ctxtEvt) { |
46 |
System.out.println("Starting DAO Context"); |
System.out.println("Starting DAO Context"); |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
ServletContext ctxt = ctxtEvt.getServletContext(); |
ServletContext ctxt = ctxtEvt.getServletContext(); |
51 |
|
|
52 |
ServiceConfig conf = null; |
ServiceConfig conf = null; |
60 |
initDataLoader(ctxt, conf); |
initDataLoader(ctxt, conf); |
61 |
|
|
62 |
initCircuitBreakers(ctxt, conf); |
initCircuitBreakers(ctxt, conf); |
63 |
|
|
64 |
|
|
65 |
|
try { |
66 |
|
Manifests.DEFAULT.append(new ServletMfs(ctxt)); |
67 |
|
} catch (Exception e) { |
68 |
|
System.out.println("Error loading config " + e.getMessage()); |
69 |
|
} |
70 |
|
|
71 |
System.out.println("DAO Context done"); |
System.out.println("DAO Context done"); |
72 |
} |
} |