code: public void setDataSourceName(String dataSourceName) {
      if (initialized) {
        throw new IllegalStateException(
            "Cannot set Data Source properties after DataSource has been used");
      }
      if (this.dataSourceName != null && dataSourceName != null
          && dataSourceName.equals(this.dataSourceName)) {
        return;
      }
      PGPoolingDataSource previous = dataSources.putIfAbsent(dataSourceName, this);
      if (previous != null) {
        throw new IllegalArgumentException(
            "DataSource with name '" + dataSourceName + "' already exists!");
      }
      if (this.dataSourceName != null) {
        dataSources.remove(this.dataSourceName);
      }
      this.dataSourceName = dataSourceName;
    }
docs: Sets the name of this DataSource. This is required, and uniquely identifies the DataSource. You
  cannot create or use more than one DataSource in the same VM with the same name.
  
  @param dataSourceName datasource name
  @throws IllegalStateException The Data Source Name cannot be changed after the DataSource has
  been used.
  @throws IllegalArgumentException Another PoolingDataSource with the same dataSourceName already
  exists.