code: public void removeSecurityDomain(String securityDomainName) throws Exception {
  
          // If not there just return
          if (!isSecurityDomain(securityDomainName)) {
              return;
          }
  
          final Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_SECURITY, SECURITY_DOMAIN, securityDomainName);
          ModelNode removeSecurityDomainNode = createRequest(REMOVE, addr);
  
          final ModelNode results = execute(removeSecurityDomainNode);
          if (!isSuccess(results)) {
              throw new FailureException(results, "Failed to remove security domain [" + securityDomainName + "]");
          }
  
          return;
      }
docs: Convenience method that removes a security domain by name. Useful when changing the characteristics of the
  login modules.
  
  @param securityDomainName the name of the new security domain
  @throws Exception if failed to remove the security domain