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:
- isyncore.prc
- isyncconf.prc
- imsaconfig.prc
- imsafile.prc
- imsadb2e.prc
- wbxmllib.prc
- isyncxpt.prc
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:
- com.ibm.mobileservices.isync
- com.ibm.mobileservices.isync.db2e.sti
- com.ibm.mobileservices.isync.event
- com.ibm.mobileservices.isync.sql
Verify that the following software is installed on your system:
- Palm OS Version 3.5 or later (with at least eight MB of memory)
- WebSphere Studio Device Developer (WSDD) Version 4.0
- DB2 Everyplace database for Palm OS Version 7.1 or later
- DB2 Everyplace Sync Client libraries Version 8.1 or later
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:
- Create a new project for the isync4j sample application:
- Open the Java Perspective in WSDD.
- Select File -> New-> Other.
- Select the wizard for J2ME for J9 and Create MIDlet Suite.
- Name the custom project, MIDlet name, and MIDlet class name in the MIDlet
Suite Creation dialog.
- Click Next.
- Click Next again to go to Java Settings.
- On the Java Settings, click on the Libraries tab
and click Create Folder.... Type lib in the New Class Folder dialog.
- Click Finish.
- Import the DB2 Everyplace ISYNC4J Java classes and set up the build path.
- Click on the project in the Packages view, then
click the menu item File->Import...
- Import the %DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/lib folder and select %DSYINSTDIR%/Clients/PalmOS/Sync/isync4j-palm/lib as the source directory.
- 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.
- Click Finish.
- 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
- Verify the isync4j library setup by building and running the sample application.
- 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.).
- 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.
- 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.
- 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