} else if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
try {
AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
boolean loaded = loadModule(configManager, configObjName);
Configuration config = configManager.getConfiguration(info.getConfigID());
if(config != null){
for (Configuration child : config.getChildren()) {
if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
ModuleDetails childDetails = new ModuleDetails(info.getConfigID(), child.getModuleType(), info.getState());
childDetails.setComponentName(child.getId().toString());
WebModule webModule = getWebModule(config, child);
if (webModule != null) {
childDetails.getContextPaths().add(webModule.getContextPath());
}
if (showDependencies) {
addDependencies(childDetails, configObjName);
}
moduleDetails.add(childDetails);
}
}
}
if (loaded) {
unloadModule(configManager, configObjName);
}
} catch (InvalidConfigException ice) {
// Should not occur
ice.printStackTrace();
}
}
} else if (shouldListConfig(info.getType())) {
ModuleDetails details = new ModuleDetails(info.getConfigID(), info.getType(), getConfigurationState(info));
try {
AbstractName configObjName = Configuration.getConfigurationAbstractName(info.getConfigID());
boolean loaded = loadModule(configManager, configObjName);
if (info.getType().getValue() == ConfigurationModuleType.EAR.getValue()) {
Configuration config = configManager.getConfiguration(info.getConfigID());
if(config != null){
Iterator childs = config.getChildren().iterator();
while (childs.hasNext()) {
Configuration child = (Configuration) childs.next();
if (child.getModuleType().getValue() == ConfigurationModuleType.WAR.getValue()) {
WebModule webModule = getWebModule(config, child);
if (webModule != null) {
details.getContextPaths().add(webModule.getContextPath());
}
}
}
}
} else if (info.getType().equals(ConfigurationModuleType.CAR)) {
Configuration config = configManager.getConfiguration(info.getConfigID());
details.setClientAppServerSide(config.getOwnedConfigurations().size() > 0);
}
if (showDependencies) {
addDependencies(details, configObjName);
}
if (loaded) {