DiameterService diaService = getDiameterService(targetName);
if (diaService == null) {
String msg = _strMgr.getString("DiameterSvcDoesNotExists", targetName);
throw new MBeanException(new ConfigException(msg));
}
PeerConfiguration peerConfig = diaService.getPeerConfiguration();
DiameterApplications apps = peerConfig.getDiameterApplicationsById(applicationsId);
if (apps == null) {
String msg = _strMgr.getString("ApplicationsNotAvl");
throw new MBeanException(new ConfigException(msg));
}
DiameterApplications[] diaApps = peerConfig.getDiameterApplications();
if (diaApps.length == 1) {
String msg = _strMgr.getString("ApplicationsRequiredAtleastOne");
throw new MBeanException(new ConfigException(msg));
}
peerConfig.removeDiameterApplications(apps);
}