code: public static boolean login(String username, String password,
                                String Login_Module_Name) {
      Subject subject = null;
      try {
        //jboss
        CallbackHandler pch = getJBossCallbackHandler(username, password);
        LoginContext loginCtx = new LoginContext(Login_Module_Name, pch);
        Debug.logVerbose("[JdonFramework] begin to login ", module);
        loginCtx.login();
  
        Debug.logVerbose("[JdonFramework] login successfully, subject=" + subject, module);
        return true;
      } catch (Exception e) {
        e.printStackTrace();
        Debug.logError(e, module);
        return false;
      }
  
    }
docs: 实现j_security_check功能
  Login_Module_Name : SecurityRealm (Jboss login-config.xml)
  @param username
  @param password
  @return boolean