/** {@inheritDoc} */
  public final void afterPropertiesSet() throws Exception {

    // find the ObjectMapper
    if (objectMapper == null
        && applicationContext != null
        && applicationContext.containsBean("objectMapper")) {
      objectMapper = (ObjectMapper) applicationContext.getBean("objectMapper");
    }
    if (objectMapper == null && applicationContext != null) {
      try {
        objectMapper =
            (ObjectMapper)
                BeanFactoryUtils.beanOfTypeIncludingAncestors(
                    applicationContext, ObjectMapper.class);
      } catch (Exception e) {
        /* no-op */
      }
    }
    if (objectMapper == null) {
      objectMapper = new ObjectMapper();
    }

    // create the service
    Object service =
        ProxyUtil.createCompositeServiceProxy(
            getClass().getClassLoader(), services, serviceInterfaces, allowMultipleInheritance);

    // create the server
    jsonRpcServer = new JsonRpcServer(objectMapper, service);
    jsonRpcServer.setErrorResolver(errorResolver);
    jsonRpcServer.setBackwardsComaptible(backwardsComaptible);
    jsonRpcServer.setRethrowExceptions(rethrowExceptions);
    jsonRpcServer.setAllowExtraParams(allowExtraParams);
    jsonRpcServer.setAllowLessParams(allowLessParams);

    // export
    exportService();
  }