ModelControllerClient mcc = null;
try {
mcc = ManagementService.createClient();
final SecurityDomainJBossASClient client = new SecurityDomainJBossASClient(mcc);
boolean ldapModulesPresent = client.securityDomainHasLoginModule(RHQ_USER_SECURITY_DOMAIN,
"org.rhq.enterprise.server.core.jaas.LdapLoginModule");
if (!ldapModulesPresent) {
LOG.info("Updating RHQ Server's JAAS login modules with LDAP support");