code: @Override
      public Connection getOrCreate() throws SQLException {
          Connection con;
          if (this.user == null && this.password == null) {
              con = this.dataSource.getConnection();
          } else {
              con = this.dataSource.getConnection(this.user, this.password);
          }
          con.setAutoCommit(isAutoCommitEnabled());
          return con;
      }
docs: Creates a database connection or gets an existing connection with the
  JNDI name, username and password specified in the constructor.
  
  @return a {@link Connection}.
  
  @throws SQLException if an error occurred creating/getting a
  {@link Connection}, possibly because the JNDI name, username and/or
  password are invalid.