private VersionCheckHandler createVersionCheckHandler(
      ServerServiceId serverSvcId, ServiceConfigHolder config, ClassLoader cl)
      throws ServiceException {
    String currentVersion = config.getMetaData().getVersion();
    if (currentVersion == null || currentVersion.length() == 0) {
      throw new ServiceCreationException(
          ErrorDataFactory.createErrorData(
              ErrorConstants.SVC_FACTORY_MISSING_SERVICE_VERSION,
              ErrorConstants.ERRORDOMAIN,
              new Object[] {serverSvcId.getAdminName()}));
    }

    Collection<String> supportedVersions = config.getSupportedVersions();
    if (supportedVersions != null) {
      supportedVersions = new ArrayList<String>(supportedVersions);
    } else {
      supportedVersions = new ArrayList<String>();
    }
    if (!supportedVersions.contains(currentVersion)) {
      supportedVersions.add(currentVersion);
    }
    supportedVersions = Collections.unmodifiableCollection(supportedVersions);

    String versionCheckClassName = config.getVersionCheckHandlerClassName();
    if (versionCheckClassName == null) {
      versionCheckClassName = SimpleVersionCheckHandler.class.getName();
    }

    VersionCheckHandler versionCheckHandler =
        ReflectionUtils.createInstance(versionCheckClassName, VersionCheckHandler.class, cl);

    VersionCheckHandlerInitContextImpl initCtx =
        new VersionCheckHandlerInitContextImpl(serverSvcId, currentVersion, supportedVersions);
    versionCheckHandler.init(initCtx);
    initCtx.kill();

    return versionCheckHandler;
  }