Package org.beangle.db.replication.impl

Examples of org.beangle.db.replication.impl.DatabaseReplicator


    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();
    DefaultTableFilter filter = new DefaultTableFilter();
    filter.addInclude("EAMS_USST.CJ_T");
    replicator.addTables(filter.filter(tables));
    // replicator.addTables(tablenames);
    replicator.start();
    System.out.println("end replicate ..... start sleep");
    Thread.sleep(1000 * 30);
  }
 
View Full Code Here


  @Test(dataProvider = "tables")
  public void hsqlReplication(String table) {
    DatabaseWrapper target = new DatabaseWrapper("PUBLIC");
    target.connect(DataSourceUtil.getDataSource("hsqldb_target"), new HSQLDialect());

    Replicator replicator = new DatabaseReplicator(source, target);
    replicator.addTable(table);
    replicator.start();
  }
View Full Code Here

  public void testOracleReplication(String table) {
    DatabaseWrapper target = new DatabaseWrapper("test");
    target.connect(DataSourceUtil.getDataSource("oracle"), new OracleDialect());

    Replicator replicator = new DatabaseReplicator(source, target);
    replicator.addTable(table);
    replicator.start();
  }
View Full Code Here

TOP

Related Classes of org.beangle.db.replication.impl.DatabaseReplicator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.