code: @Override
      protected Object createPoolOrConnection()
      {
          PersistenceUnitMetadata persistenceUnitMetadata = kunderaMetadata.getApplicationMetadata()
                  .getPersistenceUnitMetadata(getPersistenceUnit());
  
          Properties props = persistenceUnitMetadata.getProperties();
  
          String host = externalProperties != null ? (String) externalProperties.get(PersistenceProperties.KUNDERA_NODES)
                  : null;
          String port = externalProperties != null ? (String) externalProperties.get(PersistenceProperties.KUNDERA_PORT)
                  : null;
  
          if (host == null)
          {
              host = props.getProperty(PersistenceProperties.KUNDERA_NODES);
          }
  
          if (port == null)
          {
              port = props.getProperty(PersistenceProperties.KUNDERA_PORT);
          }
  
          String[] hosts = getHosts(host);
  
          Properties properties = ((ESClientPropertyReader) propertyReader).getConnectionProperties();
  
          Builder builder = Settings.settingsBuilder();
  
          builder.put("client.transport.sniff", true);
  
          if (properties != null)
          {
              builder.put(properties);
          }
  
          Settings settings = builder.build();
  
          TransportClient client = TransportClient.builder().settings(settings).build();
  
          for (String h : hosts)
          {
              client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress(h, new Integer(port))));
          }
  
          return client;
      }
docs: /*
  (non-Javadoc)
  
  @see
  com.impetus.kundera.loader.GenericClientFactory#createPoolOrConnection()