Hi,
Mesh4x is a framework and core libraries to support "2 way sync
process" based on FeedSync specification.
You have diferents adapters to syncronize diferents kind of data
sources (HibernateAdapter, HttpAdapter (for synchronize with
SyncServer), MsExcelAdapter, MSAccessAdapter, kmlAdapter, SMS, Mobile,
etc).
For MySQL tables we are using Hibernate with XML entities (no POJO
classes). You must use HibernateSyncAdapterFactory to build an
ISyncAdapter for MySQL (beta version, testing fase).
This is an example:
// create MySqlAdapter: DB=MyDB table=myTable
ISyncAdapter adapterA =
HibernateSyncAdapterFactory.createHibernateAdapter(
"jdbc:mysql:///MyDB",
"myUser",
"myPassword",
com.mysql.jdbc.Driver.class,
org.hibernate.dialect.MySQLDialect.class,
"myTable",
"myTable_sync",
"
http://mesh4x/myTable#",
"c:\\MyMappingFolder\\");
// create MySqlAdapter: DB=MyDB2 table=myTable
ISyncAdapter adapterB =
HibernateSyncAdapterFactory.createHibernateAdapter(
"jdbc:mysql:///MyDB2",
"myUser2",
"myPassword2",
com.mysql.jdbc.Driver.class,
org.hibernate.dialect.MySQLDialect.class,
"myTable",
"myTable_sync",
"
http://mesh4x/myTable#",
"c:\\MyMappingFolder2\\");
SyncEngine syncEngine = new SyncEngine(adapterA, adapterB); //
create a sync engine
List<Item> conflicts = syncEngine.synchronize(); // execute sync
algorithm
// Assert.assertEquals(0, conflicts.size());
Thanks,
JMT