code: public JdbcConnectionDescriptor addDescriptor(String jcdAlias, DataSource dataSource, String username, String password)
      {
          JdbcConnectionDescriptor jcd = new JdbcConnectionDescriptor();
  
          jcd.setJcdAlias(jcdAlias);
          jcd.setDataSource(dataSource);
          if (username != null)
          {
             jcd.setUserName(username);
             jcd.setPassWord(password);
          }
          utils.fillJCDFromDataSource(jcd, dataSource, username, password);
          if ("default".equals(jcdAlias))
          {
              jcd.setDefaultConnection(true);
              // arminw: MM will search for the default key
              // MetadataManager.getInstance().setDefaultPBKey(jcd.getPBKey());
          }
          addDescriptor(jcd);
          return jcd;
      }
docs: Creates and adds a new connection descriptor for the given JDBC data source.
  This method tries to guess the platform to be used, but it should be checked
  afterwards nonetheless using the {@link JdbcConnectionDescriptor#getDbms()} method.
  Note that the descriptor won't have a value for the driver because it is not possible
  to retrieve the driver classname from the data source.
  
  @param jcdAlias   The connection alias for the created connection; if 'default' is used,
  then the new descriptor will become the default connection descriptor
  @param dataSource The data source
  @param username   The user name (can be <code>null</code>)
  @param password   The password (can be <code>null</code>)
  @return The created connection descriptor
  @see JdbcConnectionDescriptor#getDbms()