code: public void createNewSecurityDomain(String securityDomainName, LoginModuleRequest... loginModules)
              throws Exception {
          //do not close the controller client here, we're using our own..
          CoreJBossASClient coreClient = new CoreJBossASClient(getModelControllerClient());
          String serverVersion = coreClient.getAppServerVersion();
          if (serverVersion.startsWith("7.2")) {
              createNewSecurityDomain72(securityDomainName, loginModules);
          }
          else {
              createNewSecurityDomain71(securityDomainName, loginModules);
          }
  
      }
docs: Creates a new security domain including one or more login modules.
  The security domain will be replaced if it exists.
  
  @param securityDomainName the name of the new security domain
  @param loginModules an array of login modules to place in the security domain.
  They are ordered top-down in the same index order of the array.
  @throws Exception if failed to create security domain