docs: protected synchronized void bindDataSource() throws SQLException {
      // we'll check in the synchronized section again (to prevent unnecessary reinitialization)
      if (null != realDataSource) {
        return;
      }
  
      final P6SpyLoadableOptions options = P6SpyOptions.getActiveInstance();
  
      // can be set when object is bound to JNDI, or
      // can be loaded from spy.properties
      if (rdsName == null) {
        rdsName = options.getRealDataSource();
      }
      if (rdsName == null) {
        throw new SQLException("P6DataSource: no value for Real Data Source Name, cannot perform jndi lookup");
      }
  
      // setup environment for the JNDI lookup
      Hashtable<String, String> env = null;
      String factory;
  
      if ((factory = options.getJNDIContextFactory()) != null) {
        env = new Hashtable<String, String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, factory);
        String url = options.getJNDIContextProviderURL();
        if (url != null) {
          env.put(Context.PROVIDER_URL, url);
        }
        String custom = options.getJNDIContextCustom();
        if( custom != null ) {
          env.putAll(parseDelimitedString(custom));
        }
      }
  
      // lookup the real data source
      InitialContext ctx;
      try {
        if (env != null) {
          ctx = new InitialContext(env);
        } else {
          ctx = new InitialContext();
        }
        realDataSource = (CommonDataSource) ctx.lookup(rdsName);
      } catch (NamingException e) {
        throw new SQLException("P6DataSource: naming exception during jndi lookup of Real Data Source Name of '" + rdsName + "'. "
          + e.getMessage(), e);
      }
  
      // Set any properties that the spy.properties file contains
      // that are supported by set methods in this class
      Map<String, String> props = parseDelimitedString(options.getRealDataSourceProperties());
      if (props != null) {
        setDataSourceProperties(props);
      }
  
      if (realDataSource == null) {
        throw new SQLException("P6DataSource: jndi lookup for Real Data Source Name of '" + rdsName + "' failed, cannot bind named data source.");
      }
    }