throws ApplicationException {
String operation = instance == MAIN_INSTANCE ? "getHostName" : "getInstanceHostname";
if (!versions.containsKey(moduleName)) {
logger.warning("Operation " + operation + " could not find the requested module "
+ " Module " + moduleName);
throw new ApplicationException(ModulesServiceError.ErrorCode.INVALID_MODULE_VALUE,
"The specified module does not exist.");
}
StringBuilder sb = new StringBuilder();
if (instance != DYNAMIC_INSTANCE_COUNT) {
AbstractModuleVersionState moduleVersionState =