}
}
}
public void afterApplicationCreated(WebAppInfo webApp) {
WebContext webContext = containerSystem.getWebContext(webApp.moduleId);
if (webContext == null) return;
// if already deployed skip this webapp
if (!deployedWebApps.add(webApp)) return;
Map<String,PortInfo> ports = new TreeMap<String,PortInfo>();
for (PortInfo port : webApp.portInfos) {
ports.put(port.serviceLink, port);
}
URL moduleBaseUrl = null;
try {
moduleBaseUrl = new File(webApp.path).toURI().toURL();
} catch (MalformedURLException e) {
logger.error("Invalid ejb jar location " + webApp.path, e);
}
for (ServletInfo servlet : webApp.servlets) {
PortInfo portInfo = ports.get(servlet.servletName);
if (portInfo == null) continue;
try {
ClassLoader classLoader = webContext.getClassLoader();
Collection<Injection> injections = webContext.getInjections();
Context context = webContext.getJndiEnc();
Class target = classLoader.loadClass(servlet.servletClass);
PortData port = WsBuilder.toPortData(portInfo, injections, moduleBaseUrl, classLoader);
HttpListener container = createPojoWsContainer(moduleBaseUrl, port, portInfo.serviceLink, target, context, webApp.contextRoot);