Search in sources :

Example 1 with XMLSchemaLoader

use of io.mycat.config.loader.xml.XMLSchemaLoader in project Mycat-Server by MyCATApache.

the class ConfigComparer method loadOldConfig.

private void loadOldConfig() {
    try {
        oldLoader = new XMLSchemaLoader();
        oldDataHosts = oldLoader.getDataHosts();
        oldDataNodes = oldLoader.getDataNodes();
        oldSchemas = oldLoader.getSchemas();
    } catch (Exception e) {
        throw new ConfigException(" old config for migrate read fail!please check schema.xml or  rule.xml  " + e);
    }
}
Also used : XMLSchemaLoader(io.mycat.config.loader.xml.XMLSchemaLoader) ConfigException(io.mycat.config.util.ConfigException) IOException(java.io.IOException) ConfigException(io.mycat.config.util.ConfigException)

Example 2 with XMLSchemaLoader

use of io.mycat.config.loader.xml.XMLSchemaLoader in project Mycat-Server by MyCATApache.

the class ConfigComparer method loadNewConfig.

private void loadNewConfig() {
    try {
        newLoader = new XMLSchemaLoader(NEW_SCHEMA, NEW_RULE);
        newDataHosts = newLoader.getDataHosts();
        newDataNodes = newLoader.getDataNodes();
        newSchemas = newLoader.getSchemas();
    } catch (Exception e) {
        throw new ConfigException(" new config for migrate read fail!please check newSchema.xml or  newRule.xml  " + e);
    }
}
Also used : XMLSchemaLoader(io.mycat.config.loader.xml.XMLSchemaLoader) ConfigException(io.mycat.config.util.ConfigException) IOException(java.io.IOException) ConfigException(io.mycat.config.util.ConfigException)

Aggregations

XMLSchemaLoader (io.mycat.config.loader.xml.XMLSchemaLoader)2 ConfigException (io.mycat.config.util.ConfigException)2 IOException (java.io.IOException)2