code: public static UserRegistry getUserRegistry(String realmName) throws WSSecurityException {
          try {
              WSSecurityService ss = wsSecurityServiceRef.getService();
              if (ss == null) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "No WSSecurityService, returning null");
                  }
              } else {
                  return ss.getUserRegistry(realmName);
              }
          } catch (WSSecurityException e) {
              String msg = "getUserRegistry for realm " + realmName + " failed due to an internal error: " + e.getMessage();
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, msg, e);
              }
              throw new WSSecurityException(msg, e);
          }
          return null;
      }
docs: Gets the UserRegistry object for the given realm. If the realm name is null
  returns the active registry. If the realm is not valid, or security is not enabled,
  or no registry is configured, returns null.
  
  @param realmName
  @return UserRegistry object
  @throws WSSecurityException if there is an internal error