}
for (EnterpriseBeanInfo enterpriseBean : ejbJar.enterpriseBeans) {
if (enterpriseBean instanceof StatelessBeanInfo || enterpriseBean instanceof SingletonBeanInfo) {
PortInfo portInfo = ports.get(enterpriseBean.ejbName);
if (portInfo == null) continue;
// remove wsdl addresses from global registry
String address = ejbAddresses.remove(enterpriseBean.ejbDeploymentId);
if (address != null) {
portAddressRegistry.removePort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId);
}
// remove container from web server
String location = ejbLocations.get(enterpriseBean.ejbDeploymentId);
if (this.wsRegistry != null && location != null) {
this.wsRegistry.removeWsContainer(location);
}
// destroy webservice container
destroyEjbWsContainer(enterpriseBean.ejbDeploymentId);
}
}
}
for (WebAppInfo webApp : appInfo.webApps) {
deployedWebApps.remove(webApp);
Map<String,PortInfo> ports = new TreeMap<String,PortInfo>();
for (PortInfo port : webApp.portInfos) {
ports.put(port.serviceLink, port);
}
for (ServletInfo servlet : webApp.servlets) {
PortInfo portInfo = ports.get(servlet.servletClass);
if (portInfo == null) continue;
// remove wsdl addresses from global registry
String address = servletAddresses.remove(webApp.moduleId + "." + servlet.servletName);
if (address != null) {