Contents Index Java synchronization example Create your Java synchronization script

MobiLink Synchronization User's Guide
  Writing Synchronization Scripts in Java
    Java synchronization example

Introduction


This section describes a working example of Java synchronization logic. Before you try to use this class or write your own class, use the following checklist to ensure you have all the pieces in place before compiling the class.

Plan 

The Java synchronization logic for this example points to the associated Java files and classes that contain functionality needed for the example to work. It will show you how to create a class CustEmpScripts. It shows you how to set up a synchronization context for the connection. Finally, the example provides Java methods to

Schema 

The tables to be synchronized are emp and cust. The emp table has three columns called emp_id, emp_name and manager. The cust table has three columns called cust_id, cust_name and emp_id. All columns in each table are synchronized. The mapping from consolidated to remote database is such that the table names and column names are identical in both databases. One additional table, an audit table, is added to the consolidated database.

Java class files 

The files used in the example are included in the Samples\MobiLink\JavaAuthentication directory.


Contents Index Java synchronization example Create your Java synchronization script