if (null == is) { throw new RuntimeException("cannot find replication.properties"); }
props.load(is);
} catch (IOException e) {
throw new RuntimeException("cannot find database.properties");
}
DatabaseWrapper source = new DatabaseWrapper(props.getProperty("source.schema"));
source.connect(DataSourceUtil.getDataSource("source"), (Dialect) (Class.forName(props
.getProperty("source.dialect")).newInstance()));
DatabaseWrapper target = new DatabaseWrapper(props.getProperty("target.schema"));
target.connect(DataSourceUtil.getDataSource("target"), (Dialect) (Class.forName(props
.getProperty("target.dialect")).newInstance()));
Replicator replicator = new DatabaseReplicator(source, target);
Set<String> tables = source.getMetadata().getTables().keySet();