code: public GenericConnectionFactory cloneWith(DataSource datasource)
     {
        try
        {
           GenericConnectionFactory factory = (GenericConnectionFactory)this.clone();
           factory.dbDataSource = datasource;
           return factory;
        }
        catch (CloneNotSupportedException e)
        {
           throw new AssertionError(); // Cannot occur
        }
     }
docs: Clones the current factory and uses the provided {@link DataSource} instead of the local one
  @param datasource the new {@link DataSource} instance to use
  @return a new factory with the expected {@link DataSource}