Installing and verifying the trap-based native synchronization provider

The trap-based native synchronization provider is used with WebSphere Studio Device Developer's (WSDD) J9 JVM on the Palm OS platform only.

This topic describes how the DB2 Everyplace isync4j for Palm OS can be used with the J9's jclMidp (J2ME MIDP) configuration. This synchronization provider references the com.ibm.oti.palmos package, so it will only run on WSDD J9 JVM for PalmOS v1.5 or above.

The following table describes where the programs that are used to install the API on Palm devices are located, where %DSYINSTDIR% represents the install directory for DB2 Everyplace.

Directory Description
%DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/lib The folder that contains the isync4j for Palm OS Java classes. These classes are imported during the implementation.
%DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/sample The folder that contains the source code for the sample isync4j application.
%DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/bin/ISyncSample.prc The sample isync4j application used with the J9 Palm OS CLDC library.

Prerequisites

The trap based native synchronization provider requires the following Sync Client native shared libraries and DB2 Everyplace libraries:

In addition, you need to install the J9 Palm OS JVM binaries on your device.

If your application is using the trap-based native synchronization provider, you must import the following isync4j Java packages:

Verify that the following software is installed on your system:

After you have installed WSDD, you must set up a Palm OS target. To set up a Palm OS target, see the WSDD Development Environment & Tools Product Documentation, in the chapter called "Getting Started with Palm OS Targets". The WSDD documentation is located on the product CD-ROM in IBM\wsdd\wsdd4.0\doc\wsddCustomer.pdf. Finally, verify that WSDD is properly installed by building and running a WSDD sample application.

Procedure

To verify proper WSDD installation:

  1. Create a new project for the isync4j sample application:
    1. Open the Java Perspective in WSDD.
    2. Select File -> New-> Other.
    3. Select the wizard for J2ME for J9 and Create MIDlet Suite.
    4. Name the custom project, MIDlet name, and MIDlet class name in the MIDlet Suite Creation dialog.
    5. Click Next.
    6. Click Next again to go to Java Settings.
    7. On the Java Settings, click on the Libraries tab and click Create Folder.... Type lib in the New Class Folder dialog.
    8. Click Finish.
  2. Import the DB2 Everyplace ISYNC4J Java classes and set up the build path.
    1. Click on the project in the Packages view, then click the menu item File->Import...
    2. Import the %DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/lib folder and select %DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/lib as the source directory.
    3. Expand the lib directory and select the checkbox for the com directory under /lib. Under Select the destination for imported resources: type the name of the project followed by /lib in the Folder: field. For example, if the project name is ISyncSample, then the field should appear as ISyncSample/lib.
    4. Click Finish.
    5. Expand the lib folder, you should see the following ISYNC4J Java packages:

      com.ibm.mobileservices.isync

      com.ibm.mobileservices.isync.db2e.sti

      com.ibm.mobileservices.isync.event

      com.ibm.mobileservices.isync.sql

  3. Verify the isync4j library setup by building and running the sample application.
    1. Import the sample application.
      • Click on the src folder for the project in the Packages view, and then click File >Import from the main menu.
      • Import ISyncSample.java. Select %DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/samples/ISyncSample/ as the source directory, then select the checkbox for ISyncSample.java. Verify that the destination for imported resources is <project>/src.).
    2. Create a build file for the sample application.
      • In the editor, click the in/exclusion tab, then click New.
      • Enter ISyncSample for the main class, select J9 for Palm 68k for the platform. Click Next.
      • Enter the Creator id, and ISyncSample for the App Name. Click Next twice.
      • Select Prc Application on PalmOS emulator. Click Finish.
    3. Modify ISyncSample.jxeLinkOptions file.
      • Expand the palm68k folder for the project in the Packages view.
      • Double click ISyncSample.jxeLinkOptions.
      • In the editor, click the in/exclusion tab, then click New.
      • Enter com.ibm.mobileservices.isync.db2e.sti.DB2eISyncProvider for the Rule pattern, then click OK.
      • In the editor, click the source tab
      • Type -vmOption -ms:15 to set the stack size.
      • Save your changes.
    4. Run the sample application.
      • Click the Run icon in the menu, then select Run ->Build ->Launch from the build file.
      • Select the target for the sample application, and click Finish.
      • If there are no errors, the Palm OS emulator should start and run the application.

You can now create your own application. When you create a new application, include a new project name for the DB2 Everyplace isync4j in the build path for your project. After you create a build file for your application, modify its jxeLinkOptions file to meet the requirements of your application.

Related concepts