class JDBCMain {

    static List<JDBCCore> createSources(Properties config) {
        authToken = config.getProperty("authToken");
        if (authToken == null) {
            log.error("No valid authentication token in server settings");
            log.error("Exiting...");
            exit(NO_AUTH_EXIT);
        }
        
        String sourceStr = config.getProperty("sources");
        if (sourceStr == null || sourceStr.equals("")) {
            log.error("No sources in server settings");
            log.error("Exiting...");
            exit(NO_SOURCE_EXIT);
        }
        
        targetVantiqServer = config.getProperty("targetServer");
        if (targetVantiqServer == null || targetVantiqServer.equals("")) {
            log.error("No server URL specified in server settings");
            log.error("Exiting...");
            exit(NO_SERVER_EXIT);
        }
                
        // Obtain potentially multiple sources from a comma delimited string of sources 
        String[] sourceNames = sourceStr.split(",");
        sources = new ArrayList<>();
        for (String sourceName : sourceNames) {
            sourceName = sourceName.trim(); // remove any spacing from the name
            
            JDBCCore source;
            source = new JDBCCore(sourceName, authToken, targetVantiqServer);
            sources.add(source);
        }
        
        return sources;
    }

}