public ConfigurationBuilder read(Configuration template) {
    this.classLoader = new WeakReference<ClassLoader>(template.classLoader());
    this.clustering.read(template.clustering());
    this.customInterceptors.read(template.customInterceptors());
    this.dataContainer.read(template.dataContainer());
    this.deadlockDetection.read(template.deadlockDetection());
    this.eviction.read(template.eviction());
    this.expiration.read(template.expiration());
    this.indexing.read(template.indexing());
    this.invocationBatching.read(template.invocationBatching());
    this.jmxStatistics.read(template.jmxStatistics());
    this.persistence.read(template.persistence());
    this.locking.read(template.locking());
    this.storeAsBinary.read(template.storeAsBinary());
    this.transaction.read(template.transaction());
    this.unsafe.read(template.unsafe());
    this.sites.read(template.sites());
    this.versioning.read(template.versioning());
    this.compatibility.read(template.compatibility());

    for (Object c : template.modules().values()) {
      Builder<Object> builder = this.addModule(ConfigurationUtils.builderFor(c));
      builder.read(c);
    }

    return this;
  }
  public GlobalConfigurationBuilder read(GlobalConfiguration template) {
    this.cl = new WeakReference<ClassLoader>(template.classLoader());

    for (Object c : template.modules().values()) {
      BuiltBy builtBy = c.getClass().getAnnotation(BuiltBy.class);
      Builder<Object> builder = (Builder<Object>) this.addModule(builtBy.value());
      builder.read(c);
    }

    asyncListenerExecutor.read(template.asyncListenerExecutor());
    asyncTransportExecutor.read(template.asyncTransportExecutor());
    remoteCommandsExecutor.read(template.remoteCommandsExecutor());
    evictionScheduledExecutor.read(template.evictionScheduledExecutor());
    globalJmxStatistics.read(template.globalJmxStatistics());
    replicationQueueScheduledExecutor.read(template.replicationQueueScheduledExecutor());
    serialization.read(template.serialization());
    shutdown.read(template.shutdown());
    transport.read(template.transport());
    site.read(template.sites());
    totalOrderExecutor.read(template.totalOrderExecutor());
    return this;
  }