Mobilink Getting Started
Total Page:16
File Type:pdf, Size:1020Kb
MobiLink Getting Started Published: March 2007 Copyright and trademarks Copyright © 2007 iAnywhere Solutions, Inc. Portions copyright © 2007 Sybase, Inc. All rights reserved. iAnywhere Solutions, Inc. is a subsidiary of Sybase, Inc. iAnywhere grants you permission to use this document for your own informational, educational, and other non-commercial purposes; provided that (1) you include this and all other copyright and proprietary notices in the document in all copies; (2) you do not attempt to "pass-off" the document as your own; and (3) you do not modify the document. You may not publish or distribute the document or any portion thereof without the express prior written consent of iAnywhere. This document is not a commitment on the part of iAnywhere to do or refrain from any activity, and iAnywhere may change the content of this document at its sole discretion without notice. Except as otherwise provided in a written agreement between you and iAnywhere, this document is provided “as is”, and iAnywhere assumes no liability for its use or any inaccuracies it may contain. iAnywhere®, Sybase®, and the marks listed at http://www.ianywhere.com/trademarks are trademarks of Sybase, Inc. or its subsidiaries. ® indicates registration in the United States of America. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All other company and product names mentioned may be trademarks of the respective companies with which they are associated. Contents About This Manual ..................................................................................... vii SQL Anywhere documentation ............................................................................... viii Documentation conventions ..................................................................................... xi Finding out more and providing feedback .............................................................. xv I. Using MobiLink Technology ..................................................................... 1 Introducing MobiLink Synchronization ..................................................................... 3 Quick start to MobiLink .......................................................................................... 4 Parts of the synchronization system ...................................................................... 7 Central data sources .............................................................................................. 9 MobiLink clients ................................................................................................... 10 MobiLink server ................................................................................................... 11 The synchronization process ............................................................................... 12 Options for writing synchronization logic ............................................................. 19 Security ................................................................................................................ 21 Running MobiLink on Mac OS X .......................................................................... 22 MobiLink Models ....................................................................................................... 25 Introduction to MobiLink models .......................................................................... 26 Creating models ................................................................................................... 27 Model mode ......................................................................................................... 30 Deploying models ................................................................................................ 42 II. MobiLink Tutorials .................................................................................. 47 Exploring the CustDB Sample for MobiLink ........................................................... 49 Introduction to the MobiLink CustDB tutorial ....................................................... 50 CustDB setup ....................................................................................................... 52 Tables in the CustDB databases ......................................................................... 58 Users in the CustDB sample ................................................................................ 61 Synchronizing CustDB ......................................................................................... 62 Maintaining the customer and order primary key pools ....................................... 66 Cleanup ............................................................................................................... 68 Copyright © 2007, iAnywhere Solutions, Inc. iii MobiLink - Getting Started Further reading .................................................................................................... 69 Exploring the MobiLink Contact Sample ................................................................. 71 Introduction to the Contact sample tutorial .......................................................... 72 Contact sample setup .......................................................................................... 73 Tables in the Contact databases ......................................................................... 75 Users in the Contact sample ................................................................................ 77 Synchronizing the Contact sample ...................................................................... 78 Monitoring statistics and errors in the Contact sample ........................................ 84 Tutorial: Using MobiLink with an Oracle 10g Consolidated Database ................. 85 Introduction to MobiLink Oracle tutorial ............................................................... 86 Lesson 1: Create your databases ........................................................................ 87 Lesson 2: Start the MobiLink server .................................................................... 92 Lesson 3: Start the MobiLink synchronization client ............................................ 93 Further reading .................................................................................................... 94 Tutorial: Using Java Synchronization Logic ........................................................... 95 Introduction to Java Synchronization tutorial ....................................................... 96 Lesson 1: Compile the CustdbScripts Java class ................................................ 97 Lesson 2: Specify class methods to handle events ............................................. 99 Lesson 3: Run the MobiLink server with -sl java ............................................... 102 Lesson 4: Test synchronization ......................................................................... 103 Cleanup ............................................................................................................. 104 Further reading .................................................................................................. 105 Tutorial: Using .NET Synchronization Logic ........................................................ 107 Introduction to .NET synchronization tutorial ..................................................... 108 Lesson 1: Compile the CustdbScripts.dll assembly with MobiLink references .......................................................................................................... 109 Lesson 2: Specify class methods for events ...................................................... 113 Lesson 3: Run MobiLink with -sl dnet ................................................................ 116 Lesson 4: Test synchronization ......................................................................... 117 Cleanup ............................................................................................................. 119 Further reading .................................................................................................. 120 Tutorial: Using .NET and Java for custom authentication .................................. 121 Introduction to MobiLink custom authentication ................................................. 122 Lesson 1: Create a Java or .NET class for custom authentication (server- side) ................................................................................................................... 123 iv Copyright © 2007, iAnywhere Solutions, Inc. MobiLink - Getting Started Lesson 2: Register your Java or .NET scripts for the authenticate_user event .................................................................................................................. 126 Lesson 3: Start the MobiLink server for Java or .NET ....................................... 127 Lesson 4: Test the authentication ...................................................................... 128 Cleanup ............................................................................................................. 129 Further Reading ................................................................................................. 130 Tutorial: Using Direct Row Handling ..................................................................... 131 Introduction to direct row handling tutorial ......................................................... 132 Lesson 1: Set up your MobiLink consolidated database ..................................