code: private JMXConnector createConnector(JmxRequest pJmxReq) throws IOException {
          ProxyTargetConfig targetConfig = pJmxReq.getTargetConfig();
          if (targetConfig == null) {
              throw new IllegalArgumentException("No proxy configuration in request " + pJmxReq);
          }
          String urlS = targetConfig.getUrl();
          if (!acceptTargetUrl(urlS)) {
              throw new SecurityException(String.format("Target URL %s is not allowed by configuration", urlS));
          }
  
          JMXServiceURL url = new JMXServiceURL(urlS);
  
          Map<String,Object> env = prepareEnv(targetConfig.getEnv());
          return JMXConnectorFactory.newJMXConnector(url,env);
      }
docs: TODO: Add connector to a pool and release it on demand. For now, simply close it.