private void migrateKeepAlive(NetworkConfig config, HttpService httpService) throws TransactionFailure { final KeepAlive keepAlive = httpService.getKeepAlive(); if (keepAlive == null) { return; } for (Protocol protocol : config.getProtocols().getProtocol()) { final Http http = protocol.getHttp(); if(http != null) { ConfigSupport.apply(new SingleConfigCode<Http>() { @Override public Object run(Http param) { param.setMaxConnections(keepAlive.getMaxConnections()); param.setTimeoutSeconds(keepAlive.getTimeoutInSeconds()); return null; } }, http); } } ConfigSupport.apply(new SingleConfigCode<HttpService>() { @Override public Object run(HttpService param) throws PropertyVetoException { param.setKeepAlive(null); return null; } }, httpService); }