separatorIndex = id.indexOf('#');
}
if (separatorIndex != -1) {
String appID = id.substring(0, separatorIndex);
String moduleID = id.substring(separatorIndex + 1);
J2eeApplication j2eeApp = appsBean.getJ2eeApplicationByName(appID);
if ((j2eeApp != null) && j2eeApp.isEnabled()) {
String location = j2eeApp.getLocation();
String moduleDir =
DeploymentUtils.getRelativeEmbeddedModulePath(
location, moduleID);
ApplicationRegistry registry =
ApplicationRegistry.getInstance();
ClassLoader appLoader =
registry.getClassLoaderForApplication(appID);
if (appLoader != null) {
Application appDesc = registry.getApplication(appLoader);
if (appDesc != null) {
Set wbds = appDesc.getWebBundleDescriptors();
WebBundleDescriptor wbd = null;
for (Iterator itr = wbds.iterator(); itr.hasNext(); ) {
wbd = (WebBundleDescriptor) itr.next();
String webUri = wbd.getModuleDescriptor().getArchiveUri();
if (moduleID.equals(webUri)) {
StringBuffer dir = new StringBuffer(location);
dir.append(File.separator);
dir.append(moduleDir);
WebModule wm = new WebModule();
wm.setName(moduleID);
wm.setContextRoot(wbd.getContextRoot());
wm.setLocation(dir.toString());
wm.setEnabled(true);
String vsList = getVirtualServers(j2eeApp.getName());
wmInfo = new WebModuleConfig();
wmInfo.setBean(wm);
wmInfo.setDescriptor(wbd);
wmInfo.setParentLoader(appLoader);
wmInfo.setVirtualServers(vsList);