contextData.put("ejbJarId", ejbJar.moduleId);
for (EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) {
if (bean instanceof StatelessBeanInfo || bean instanceof SingletonBeanInfo) {
DeploymentInfo deploymentInfo = containerSystem.getDeploymentInfo(bean.ejbDeploymentId);
if (deploymentInfo == null) continue;
PortInfo portInfo = ports.get(bean.ejbName);
if (portInfo == null) continue;
try {
PortData port = WsBuilder.toPortData(portInfo, deploymentInfo.getInjections(), moduleBaseUrl, deploymentInfo.getClassLoader());
HttpListener container = createEjbWsContainer(moduleBaseUrl, port, deploymentInfo);
// generate a location if one was not assigned
String location = port.getLocation();
if (location == null) {
location = autoAssignWsLocation(bean, port, contextData, deploymentIdTemplate);
}
if (!location.startsWith("/")) location = "/" + location;
ejbLocations.put(bean.ejbDeploymentId, location);
ClassLoader classLoader = deploymentInfo.getClassLoader();
if (wsRegistry != null) {
// add servlet to web container
List<String> addresses = wsRegistry.addWsContainer(location, container, virtualHost, realmName, transportGuarantee, authMethod, classLoader);
// one of the registered addresses to be the connonical address
String address = selectSingleAddress(addresses);
if (address != null) {
// register wsdl location
portAddressRegistry.addPort(portInfo.serviceId, portInfo.wsdlService, portInfo.portId, portInfo.wsdlPort, portInfo.seiInterfaceName, address);
logger.info("Webservice(wsdl=" + address + ", qname=" + port.getWsdlService() + ") --> Ejb(id=" + portInfo.portId + ")");
ejbAddresses.put(bean.ejbDeploymentId, address);
}
}
} catch (Throwable e) {
logger.error("Error deploying CXF webservice for ejb " + deploymentInfo.getDeploymentID(), e);
}
}
}
}
for (WebAppInfo webApp : appInfo.webApps) {