code: public void setDataSourceConnectionSource(ConnectionSource<DataSource, DataSourceSettings> connectionSource) {
          this.dataSourceName = connectionSource.getName();
          DataSource source = connectionSource.getSource();
          getProperties().put(Environment.DATASOURCE, source);
          getProperties().put(Environment.CURRENT_SESSION_CONTEXT_CLASS, GrailsSessionContext.class.getName());
          final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
          if (contextClassLoader != null && contextClassLoader.getClass().getSimpleName().equalsIgnoreCase("RestartClassLoader")) {
              getProperties().put(AvailableSettings.CLASSLOADERS, contextClassLoader);
          } else {
              getProperties().put(AvailableSettings.CLASSLOADERS, connectionSource.getClass().getClassLoader());
          }
      }
docs: Set the target SQL {@link DataSource}
  
  @param connectionSource The data source to use