logger.info("Found ejb module " + moduleType.getSimpleName() + " in war " + standardContext.getPath());
// create the ejb module and set its moduleId to the webapp context root name
EjbModule ejbModule = new EjbModule(webModule.getClassLoader(), getEjbModuleId(standardContext),file.getAbsolutePath(), null, null);
ejbModule.setClientModule(new ClientModule(null, ejbModule.getClassLoader(), ejbModule.getJarLocation(), null, ejbModule.getModuleId()));
// EJB deployment descriptors
try {
ResourceFinder ejbResourceFinder = new ResourceFinder("", standardContext.getLoader().getClassLoader(), file.toURI().toURL());
Map<String, URL> descriptors = ejbResourceFinder.getResourcesMap("META-INF/");
descriptors = DeploymentLoader.altDDSources(descriptors, true);
ejbModule.getAltDDs().putAll(descriptors);
ejbModule.getClientModule().getAltDDs().putAll(descriptors);
} catch (IOException e) {
logger.error("Unable to determine descriptors in jar.", e);
}
// add module to app