if (operation == null) {
log.error("Operation " + operationName + "cannnot be found!");
throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
}
AxisModule module = axisConfig.getModule(moduleId);
if (module == null) {
log.error("Module " + moduleId + "cannnot be found!");
throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.OPERATION_NOT_FOUND);
}
if (axisConfig.isEngaged(module)) {
throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_GLOBALLY);
}
AxisServiceGroup axisServiceGroup = service.getAxisServiceGroup();
if (axisServiceGroup.isEngaged(module)) {
// Module is already engaged so just return the value;
throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE_GROUP);
}
if (service.isEngaged(module)) {
// Module is already engaged so just return the value;
throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_SERVICE);
}
if (operation.isEngaged(module)) {
// Module is already engaged so just return the value;
throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.ALREADY_ENGAGED_OPERATION);
}
try {
if (RAHAS_MODULE_NAME.equalsIgnoreCase(module.getName())) {
AxisModule rampartModule = axisConfig.getModule(RAMPART_MODULE_NAME);
if (rampartModule == null) {
throw new ModuleMgtException(ModuleMgtException.WARNING, ModuleMgtMessageKeys.RAHAS_RAMPART_NOT_FOUND);
}
if (!operation.isEngaged(rampartModule)) {
pf.getOperationPM().engageModuleForOperation(rampartModule, operation);