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; |
41 |
// TODO Auto-generated method stub |
// TODO Auto-generated method stub |
42 |
} |
} |
43 |
|
|
44 |
@Override |
@SuppressWarnings("deprecation") |
45 |
|
@Override |
46 |
public void contextInitialized(ServletContextEvent ctxtEvt) { |
public void contextInitialized(ServletContextEvent ctxtEvt) { |
47 |
System.out.println("Starting DAO Context"); |
System.out.println("Starting DAO Context"); |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
ServletContext ctxt = ctxtEvt.getServletContext(); |
ServletContext ctxt = ctxtEvt.getServletContext(); |
52 |
|
|
53 |
ServiceConfig conf = null; |
ServiceConfig conf = null; |
61 |
initDataLoader(ctxt, conf); |
initDataLoader(ctxt, conf); |
62 |
|
|
63 |
initCircuitBreakers(ctxt, conf); |
initCircuitBreakers(ctxt, conf); |
64 |
|
|
65 |
|
|
66 |
|
try { |
67 |
|
Manifests.DEFAULT.append(new ServletMfs(ctxt)); |
68 |
|
} catch (Exception e) { |
69 |
|
System.out.println("Error loading config " + e.getMessage()); |
70 |
|
} |
71 |
|
|
72 |
System.out.println("DAO Context done"); |
System.out.println("DAO Context done"); |
73 |
} |
} |