| Oracle9i Lite Developer's Guide for EPOC Release 5.0 Part Number A90106-01 |
|
This document discusses synchronization with the Mobile Server. Topics include:
Mobile Server allows new and existing applications and data on handheld devices to be replicated, synchronized, and shared with an Oracle server. Data on the device can be mapped directly to an Oracle8 data server through a replication agent on the Oracle8 database. The Mobile Server uses a publish/subscribe model that manages the data subsetting policy for the mobile devices. Data on the device is mapped to Oracle8 through transports by HTTP.
The Message Generator and Processor (MGP) is a Java background process that uploads transactions from the applications running on the client devices. The MGP then applies the transactions to Oracle databases. It also generates new updates (data) for the client devices to download. Please refer to the Oracle9i Lite Publishing, Managing, and Deploying Guide for more information concerning administration of the MGP.
The Mobile Server uses publications and subscriptions. Publications are (optionally parameterized) queries that are defined against Oracle8 tables or views. A publication is subscribed to by one or more users. The Mobile Server tracks users for devices. Through established subscriptions, the Mobile Server prepares any new data for each client device. Data can be partitioned either horizontally by rows, or vertically by columns. Only the required subset of data is downloaded to each client.
In the Mobile Server publish and subscribe model, each publication can contain multiple publication items. A publication item typically maps to a table on the device. You can rename table columns within publication items. Each publication item can contain multiple parameters. See Section 3.3, "The Publish and Subscribe Model" for more information.
The first time a client device replicates, the Mobile Server automatically creates the database objects on the client device. By default, the primary key index of a table is automatically replicated from the server. You can create secondary indexes on the device through a publication item. If you do not want the primary index, you must explicitly drop it from the publication items. See the Consolidator Admin API Specification for specific API information.
On the server side, the Mobile Server works against Oracle8. On the client side, the Mobile Sync supports replication with the Oracle Lite database on any platform supported by Oracle Lite.
The Mobile Server synchronization process can be customized in many ways. You can attach application logic to the Mobile Server by binding PL/SQL packages to publication items. The packages must expose the BeforeCompose, AfterCompose, BeforeApply, and AfterApply methods. The Mobile Server calls these methods before and after it:
The Mobile Server passes the current Mobile Sync user to these methods.
User-defined PL/SQL packages can cache or pre-compute data. They can also resolve foreign key constraint violation problems. See Section 3.1.7, "Foreign Key Constraints in Updatable Publication Items" for more information. See Section 3.4.1, "Callback Customization Using Compose and Apply" for details on using these calls.
Special characters including spaces are supported in client, table, view, and column names. Callers must provide object names to the Mobile Server exactly as they are stored in the database (in most cases, using uppercase letters).
The Mobile Server supports fast refresh and update operations for complex multiple table publications that meet specific criteria.
For a view to be updatable, it must have a parent table. A parent table contains any of the view's base tables in which a primary key is included in the view's column list and is unique in the view's row set. If you want to make a view updatable, you must provide the Mobile Server with the appropriate hint and the view's parent table before you create a publication item on the view.
To make view-based publication items updatable, you must use the following two mechanisms:
Parent table hints define the parent table for a given view. Parent table hints are provided through the ParentHint function in the Mobile Server Admin API. See "Parent Hint" in the Mobile Server Admin API Specification, for more information.
INSTEAD OF triggers are used to execute INSTEAD OF INSERT, INSTEAD OF UPDATE, or INSTEAD OF DELETE commands. INSTEAD OF triggers also map these DML commands into operations that are performed against the view's base tables. INSTEAD OF triggers are a function of Oracle8. See the Oracle8 documentation for details on INSTEAD OF triggers.
Publication items are created for fast refresh by default. Under fast refresh, only incremental changes are replicated. The advantages of fast refresh are reduced overhead and increased speed when replicating data stores with large amounts of data where there are limited changes between synchronization sessions.
The Mobile Server performs a fast refresh of a view if the view meets the following criteria:
The view requires only a unique primary key for the parent table. The primary keys of other tables may be duplicated. For each base table primary key column, you must provide the Mobile Server with a hint about how this column is called in the view. You can accomplish this by using PrimaryKeyHint in the Mobile Server Admin API. See the Consolidator Admin API Specification for more information.
Publication items can be created for complete refresh using the CompleteRefresh call from the Mobile Server Admin API. When this mode is specified, client data is completely refreshed with current data from the server after every sync. An administrator can force a complete refresh on an entire publication via an API call. The complete refresh function forces complete refresh of a publication for a given client. See the Consolidator Admin API Specification for more information.
Replicating tables between Oracle8 and client devices in updatable mode can result in foreign key constraint violations if the tables have referential integrity constraints. When a foreign key constraint violation occurs, the server rejects the client transaction.
For example, two tables EMP and DEPT have referential integrity constraints. The DeptNum (department number) attribute in the DEPT table is a foreign key in the EMP table. The DeptNum value for each employee in the EMP table must be a valid DeptNum value in the DEPT table.
A Mobile Server user adds a new department to the DEPT table, and then adds a new employee to this department in the EMP table. The transaction first updates DEPT and then updates the EMP table. However, the database application does not store the sequence in which these operations were executed.
When the user replicates the Mobile Server updates the EMP table first. In doing so, it attempts to create a new record in EMP with an invalid foreign key value for DeptNum. Oracle8 detects a referential integrity violation. The Mobile Server rolls back the transaction and places the transaction data in the Mobile Server error queue. In this case, the foreign key constraint violation occurred because the operations within the transaction are performed out of their original sequence.
You can avoid foreign key constraint violations based on out-of-sequence operations by using DEFERRABLE constraints in conjunction with the BeforeApply and AfterApply functions. DEFERRABLE constraints can be either INITIALLY IMMEDIATE or INITIALLY DEFERRED. The behavior of DEFERRABLE INITIALLY IMMEDIATE foreign key constraints is identical to regular immediate constraints. They can be applied interchangeably to applications without impacting functionality.
The Mobile Server calls the BeforeApply function before it applies client transactions to the server and calls the AfterApply function after it applies the transactions. Using BeforeApply function, you can set constraints to DEFFERED to delay referential integrity checks. After the transaction is applied, call the AfterApply function to set constraints to IMMEDIATE. At this point, if a client transaction violates referential integrity, it is rolled back and moved into error queues.
To prevent foreign key constraint violations using DEFERRABLE constraints:
AfterApply function as follows:
procedure BeforeApply(clientname varchar2) is cur integer; begin cur := dbms_sql.open_cursor; dbms_sql.parse(cur,'SET CONSTRAINT SAMPLE3.address14_fk DEFERRED', dbms_sql.native); dbms_sql.close_cursor(cur); end; procedure AfterApply(clientname varchar2) is cur integer; begin cur := dbms_sql.open_cursor; dbms_sql.parse(cur, 'SET CONSTRAINT SAMPLE3.address14_fk IMMEDIATE', dbms_sql.native); dbms_sql.close_cursor(cur); end;
Table weight is an integer property of association between publications and publication items. Mobile Server uses table weight to determine which order to apply Client Operations to master tables as follows:
In the example listed in Section 3.1.7.1, "Foreign Key Constraint Violation Example", a constraint violation error could be resolved by assigning DEPT a lower table weight than EMP. For example:
(DEPT weight=1, EMP weight=2)
With the Mobile Server, a compatibility with Oracle8 advanced replication error occurs when the client updates a row at the same time that the server deletes it. All other errors, such as nullity violations or foreign key constraint violations, are replication errors.
The Mobile Server does not automatically resolve replication errors. Instead, the Mobile Server rolls back corresponding transactions, and moves transaction operations into the Mobile Server error queue. Later, Mobile Server database administrators can change these transaction operations and re-execute or purge the transactions from the error queue.
A Mobile Server replication conflict occurs if:
See Section 3.4.5, "Resolving Conflicts Using the Error Queue" for more information on conflict resolution techniques.
The Mobile Server uses internal versioning to detect replication conflicts. A version number is maintained for each client record as well as for each server record. When a client's changes are applied to the server, the Mobile Server will detect version mismatches and resolve conflicts according to winning rules.
The Mobile Server uses winning rules to automatically resolve replication conflicts. The following winning rules are supported:
When the client wins, the Mobile Server automatically applies client changes to the server. When the server wins, the Mobile Server automatically composes changes for the client.
You can customize the Mobile Server's conflict resolution mechanism by setting the winning rule to "Client Wins" and attaching BEFORE INSERT, UPDATE, and DELETE triggers to database tables. The triggers compare old and new row values and resolve client changes as specified.
The Oracle8 and Oracle9i Lite tables that the Mobile Server synchronizes must use compatible datatypes. Oracle8 datatypes are compatible with Oracle9i Lite datatypes.
All Oracle9i Lite-based snapshots are created by the Mobile Sync during replication. The Mobile Server automatically selects Oracle9i Lite datatypes depending on data precision in Oracle8. The following table shows the data conversion. Oracle datatypes appear in the left column and Oracle9i Lite datatypes appear in the top row. "X" indicates unconditionally supported and "-" indicates not supported. Datatypes 1B, 2B, and 4B are specifically OKAPI datatypes. See the Oracle9i Lite Object Kernal API Reference for more information.
Table 3-1 Oracle Lite Datatypes
The Mobile Server uses a publish and subscribe model to centrally manage data distribution between Oracle servers and handheld devices. The publish and subscribe model can be implemented programmatically to invoke certain specialized features using the Mobile Server Admin API and the Consolidator Admin API both of which are part of the Mobile Server. This model includes the following:
Table 3-2 Publish/Subscribe Model Elements
To implement the Mobile Server publish/subscribe model, perform the following:
You can implement the Mobile Server publish/subscribe model by using one of the following:
Table 3-3 Methods to Implement Publish and Subscribe Model
| Implementation Method | Definition |
|---|---|
|
Packaging Wizard |
The preferred method. See Section 4, "Sample Orders Application" for more information. |
|
Pure Java methods |
Mobile Server uses the Consolidator Admin and Mobile Server Admin API executed from a Java program using pure Java methods. |
|
Note: Passwords used by the Consolidator Admin API are case sensitive. Passwords used by the Mobile Server Admin API are not case sensitive. |
This section describes how to connect to the Mobile Server using Java methods.
ResourceManager.openConnection("MOBILEADMIN", "MANAGER");
This section describes how to create a user, change a password, and drop a user using the Mobile Server Admin API.
You can create Mobile Server users with the CreateUser() function which has the following syntax:
public static boolean createUser(String userName, String password, String fullName, String privilege);
The following example creates a user "MOBILE" with the parameters listed in the table:
Table 3-4 Create User Example Parameters
ResourceManager.createUser("MOBILE","MOBILE","MOBILEUSER","C");
You can change passwords for Mobile Server users with the SetPassword() function which as the following syntax:
public static void setPassword(String userName, String newpwd);
The following example changes the password for the user "MOBILE" :
Table 3-5 Set Password Example Parameters
| Parameter | Value | Definition |
|---|---|---|
|
|
|
Specifies user name for mobile client. |
|
|
|
Specifies the new password for the mobile client. |
ResourceManager.setPassword("MOBILE","MOBILENEW");
You can drop existing Mobile Server users with the dropUser() function using the following syntax:
public static void dropUser(String userName);
The following example drops the user "MOBILE":
Table 3-6 Drop User Example Parameters
| Parameter | Value | Definition |
|---|---|---|
|
userName |
"MOBILE" |
Specifies user name for mobile client. |
ResourceManager.dropUser("MOBILE");
This section describes how to create a publication.
Publication item names are limited to twenty-six characters and must be unique across all publications. Publication items can be defined for both tables and views. When publishing an object, the user is required to specify the publication item in which the object resides. When publishing Updatable multi-table views, there are certain restrictions that apply:
When creating publication items, the user can define a parameterized select statement with a character limit of up to an 8k. Subscription parameters can be specified at this time, and will be used during replication to limit the data published to each client. String substitution is used to replace the values of the parameters when a user subscribes.
You can create publications using the CreatePublication function, which has the following syntax:
public static void CreatePublication(String name, int client_storage_type, String client_name_template, String enforce_ri) throws ThrowableConsolidator
The following example creates a publication named "T_SAMPE1" with the parameters listed in the table:
Table 3-7 Create Publication Sample Parameters
Consolidator.CreatePublication("T_SAMPLE1", Consolidator.OKPI_EPOC, "%s", null);
|
Note: If you use Oracle Lite database as the client storage type, the database does not have an extension. |
This section describes how to create publication items.
You can create publication items using the CreatepublicationItem function, which has the following syntax:
public static void CreatePublicationItem(String name, String owner,String store, String refresh_mode, String select_stmt, String cbk_owner, String cbk_name) throws Throwable
The following examples create a publication item named P_SAMPLE1 with the parameters listed in the table:
Table 3-8 Create Publication Item Sample Parameters
| Parameter | Value | Definition |
|---|---|---|
|
|
SAMPLE1 |
Specifies that SAMPLE1 is the base object owner. |
|
|
ADDROLRL4P |
Specifies that ADDROLRL4P is the base object name. |
|
|
F or C |
Defines the refresh mode as fast or complete. See Section 3.1.6, "Fast Refresh and Update Operation for Views" for more information. |
|
|
See the examples. |
Selects data from the specified columns in |
|
|
null |
Specifies the callback package owner as NULL. For more information, see Section 3.4.1, "Callback Customization Using Compose and Apply". |
|
|
null |
Specifies the callback package name as NULL. For more information, see Section 3.4.1, "Callback Customization Using Compose and Apply". |
Consolidator.CreatePublicationItem("P_SAMPLE1", "SAMPLE1", "ADDROLRL4P", "F" , "SELECT LastName,FirstName, company, phone1, phone2, phone3, phone4, phone5, phone1id, phone2id, phone3id, phone4id, phone5id, displayphone, address, city, state, zipcode, country, title, custom1, custom2, custom3, custom4, note FROM sample1.addrolrl4p" + " WHERE upper(company) > " + ":COMP", null, null);
Mobile Server makes a callout during synchronization indicating whether the client device is attempting a null sync. A null sync refers to the fact that the client has no changes to upload. This callout can be implemented by creating a PL/SQL package within the Mobile Server repository. The package must have the following specification:
create or replace package CUSTOMIZE as procedureNullSync(p_Client IN varchar2, p_NullSync as boolean); end CUSTOMIZE;
This section describes how to retrieve publication item names.
public static String getPublicationItemName(String Publication Item, int platform);
The constant int platform identifies the platform for which the snapshot was created. The constant argument is "ResourceManager." followed by "WTG", "PALM", "EPOC", or "WINCE" depending on the platform. See the Mobile Server Admin API Specification for more information.
The following example returns a publication item called "DEPT" for an EPOC application.
Table 3-9 Get Publication Item Name Example Parameters
| Parameter | Value | Definition |
|---|---|---|
|
|
DEPT |
String name identifying a snapshot or table. |
|
|
ResourceManager.PALM |
Constant representing the platform type for which the snapshot was created. |
ResourceManager.getPublicationItemName("DEPT",ResourceManager.EPOC);
The Mobile Server supports automatic deployment of indexes in Oracle Lite databases on client devices. The Mobile Server automatically replicates primary key indexes from the server database. The Consolidator Admin API provides calls to explicitly deploy unique, regular, and primary key indexes to client devices as well.
You can deploy a publication item index with the CreatePublicationItemIndex function, which has the following syntax:
public static void CreatePublicationItemIndex(String name, String publication_item, String pmode, String columns) throws Throwable
The examples in this section create a publication item index named INDEX001 for the publication item PSAMPLE1. The publication item index is a regular index which includes the ZIPCODE column as defined in the table:
Table 3-10 Create Publication Item Index Sample Parameters
Consolidator.CreatePublicationItemIndex("INDX001", "P_SAMPLE1", "I", "ZIPCODE");
Client-side indexes can be defined for existing publication items. There are three types of indexes that can be specified:
Note: When an index of type 'U' or 'P' is defined on a publication item, there is no check for duplicate keys on the server. If the same constraints do not exist on the base object of the publication item, Mobile Sync may fail with a duplicate key violation. See the Consolidator Admin API Specification for more information.
Once you create a publication item, you must associate it with a publication. To change the definition, you can either remove the publication item and then recreate it with the new definition or use schema evolution depending on your requirements. See "Drop Publication Item" and "Alter Publication Item" respectively in the Consolidator Admin API Specification for more information.
You can add publication items to the publication using the AddPublicationItem function, which has the following syntax:
public static void AddPublicationItem(String publication, String item,String columns, String disabled_dml, String conflict_rule, String restricting-predicate, String weight) throws Throwable
The following examples add a publication item named P_SAMPLE1 to the publication T_SAMPLE1. The added publication item has the following parameters:
Table 3-11 Add Publication Item Sample Parameter
| Parameter | Value | Definition |
|---|---|---|
|
|
T_SAMPLE |
Defines T_SAMPLE as the publication to receive the new item. |
|
|
P_SAMPLE |
Defines P_SAMPLE as the publication item to be added. |
|
|
null |
Specifies that no columns are renamed. |
|
|
null |
Specifies that no options are selected for disabling DML. See the Consolidator Admin API Specification for other values. |
|
|
S |
Defines the server as the winner in conflict resolution. See Section 3.3.7.2, "Defining Conflict Rules" for other values. |
|
|
null |
Specifies high-priority mode. When a client is synchronizing in high priority mode, the predicate is used to limit data pushed to the device. |
|
weight |
null |
Specified as null or an integer to determine priority in executing Client Operations to master tables. See Section 3.3.7.3, "Using Table Weight" for more information. |
Consolidator.AddPublicationItem("T_SAMPLE1", "P_SAMPLE1", null, null, "S",null null);
Publication items can be defined as read-only by disabling the DML. See the Consolidator Admin API Specification for more information.
When adding a publication item to a publication, the user can specify winning rules to resolve replication conflicts in favor of either the client 'C' or the server 'S'. A Mobile Server replication conflict is detected under any of the following situations:
See the Consolidator Admin API Specification for more information.
Table weight is an integer property of association between publications and publication items. Mobile Server uses table weight to determine which order to apply Client Operations to master tables as follows:
The Mobile Server supports sequence partitioning and replication to client devices.
You can create a sequence with the CreateSequence function, which has the following syntax:
public static void CreateSequence(String name) throws Throwable
The following examples create a sequence named CUSTOM1:
Consolidator.CreateSequence("CUSTOM1");
You can create a user subscription to a publication by using one of the following methods.
You can subscribe users to a publication using the CreateSubscription function, which has the following syntax:
public static void CreateSubscription(String publication, String clientid) throws Throwable
The following examples subscribe the client, DAVIDL, to the publication, T_SAMPLE1, with the parameters listed in the following table.
Table 3-12 Create Subscription Sample Parameters
| Parameter | Value | Definition |
|---|---|---|
|
|
T_SAMPLE1 |
Defines the publication as T_SAMPLE1. |
|
|
DAVIDL |
Defines the client as DAVIDL. |
Consolidator.CreateSubscription("T_SAMPLE1", "DAVIDL");
You can use Mobile Server sequences to generate unique primary keys on client devices. To use a replicated sequence, you need to first create it and then partition it for Mobile Sync users.
You can create sequence partitions using the CreateSequencePartition function, which has the following syntax:
public static void CreateSequencePartition(String name, String clientid, long curr_val, long incr) throws Throwable
The following examples partition the CUSTOM1 sequence using the parameters specified in the table:
Table 3-13 Create Sequence Partition Sample Parameters
Consolidator.CreateSequencePartition("CUSTOM1", "DAVIDL", 1000, 1);
|
Note: To ensure that the sequence is unique, use a unique starting position and set the increment value equal to the total number of clients on the server. |
Some publications have parameters. When a publication has parameters, you must set those parameters for the publication's subscription.
You can define subscription instantiation parameters with the SetSubscriptionParameter function, which has the following syntax:
public static void SetSubscriptionParameter(String publication, String clientid, String param_name, String param_value) throws Throwable
The following examples subscribe the client, DAVIDL, to the publication, T_SAMPLE1, with the parameters listed in the table:
Table 3-14 Set Subscription Parameter Sample Parameters
Consolidator.SetSubscriptionParameter("T_SAMPLE1", "DAVIDL", "COMP", "'P'");
After you set a subscription's publication parameters, you complete the subscription process by instantiating the subscription. When the Mobile Server instantiates a subscription, it creates a complete internal representation of the subscription.
You can instantiate a subscription with the InstantiateSubscription function, which has the following syntax:
public static void InstantiateSubscription(String publication, String clientid) throws Throwable
The following examples instantiate a client's subscription to a publication, with the values specified in the table:
Table 3-15 Instantiate Subscription Sample Parameters
| Parameter | Value | Definition |
|---|---|---|
|
|
T_SAMPLE1 |
Defines the publication as T_SAMPLE1. |
|
|
DAVIDL |
Defines the client as DAVIDL. |
Consolidator.InstantiateSubscription("T_SAMPLE1", "DAVIDL");
You can add additional columns to existing publication items. These new columns are pushed to snapshots on all subscribing clients the next time they synchronize. This is accomplished through a complete refresh of all changed publication items.
This allows additional columns to be added to an existing publication item.
public static void AlterPublicationItem(String name, String select_stmt) throws ThrowableTable 3-16 Alter Publication Item Sample Parameters
Consolidator.AlterPublicationItem("P_SAMEPLE1", "select * from EMP");
The following features include special functions which are not required for most application designs.
When creating publication items, the user can specify a customizable package to be called during the Apply and Compose phase of the MGP background process. These procedures enable you to incorporate customized code into the process. The clientname and tranid are passed to allow for customization at the user and transaction level.
This procedure must be called before any client's data from inqueue is applied.
procedure BeforeApply(clientname varchar2)
This procedure must be called after all client's data is applied.
procedure AfterApply(clientname varchar2)
This procedure must be called before client's data with tranid is applied.
procedure BeforeTranApply(tranid number)
This procedure must be called after client's data with tranid is applied.
procedure AfterTranApply(tranid number)
This procedure must be called before outqueue is composed.
procedure BeforeCompose(clientname varchar2)
This procedure must be called after outqueue is composed.
procedure AfterCompose(clientname varchar2)
Once a publication item has been created, a user can specify a customized PL/SQL procedure to be called in place of DML operations for that publication item. There can be only one mobile_dml_procedure per publication or pub_item. For example, if you want to have a DML procedure for a publication item A that has the following query:
select A,B,C from pub_item_a_table
where A is a primary key, then your DML procedure should have the following signature:
any_schema.any_package.any_name (DML in CHAR(1), A in TYPE, B in TYPE, C in TYPE, A_OLD in TYPE)
This procedure will be called with 'I', 'U', 'D' as the DML type. In case of inserts and deletes, A_OLD will be null. In case of updates, it will be set to the primary key of the row that is being updated.
You can specify a virtual primary key for publication items where the base object does not have a primary key defined. There are methods for creating and dropping a virtual primary key.
This creates a virtual primary key column.
This is used to create an updatable publication item where the primary key is a virtual column.
public static void CreateVirtualPKColumn(String owner, String store, String column) throws ThrowableTable 3-17 Create Virtual Primary Key Column Parameters
Consolidator.CreateVirtualPKColumn("SAMPLE1", "DEPT", "DEPT_ID");
This allows a primary key to be dropped.
public static void DropVirtualPKColumn(String owner, String store) throws ThrowableTable 3-18 Drop Virtual Primary Key Column Parameters
| Parameter | Value | Description |
|---|---|---|
|
|
|
A string specifying a the owner of the base object. |
|
|
|
A string specifying the base object. |
Consolidator.DropVirtualPKColumn("SAMPLE1", "DEPT");
A restricting predicate can be assigned to a publication item as it is added to a publication. When a client is synchronizing in high priority mode, the predicate is used to limit data pushed to the device. This parameter can be null. This parameter is for advanced use.
For each publication item created, a separate and corresponding error queue is created. The purpose of this queue is to store transactions that fail due to unresolved conflicts. The administrator can attempt to resolve the conflicts, either by modifying the error queue data or that of the server, and then she may attempt to re-apply the transaction via the Execute Transaction API call. The administrator may also purge the error queues through the Purge Transaction API call.
The execute transaction function re-executes transactions in the Consolidator error queue.
public static void ExecuteTransaction(String clientid, long tid) throws ThrowableTable 3-19 Execute Transaction Parameters
| Parameter | Description |
|---|---|
|
|
The Mobile Sync name. |
|
|
The transaction ID. |
Consolidator.ExecuteTransaction("DAVIDL", 100002);
The purge transaction function purges a transaction from the Mobile Server error queue.
public static void PurgeTransaction(String clientid, long tid) throws ThrowableTable 3-20 Purge Transaction Parameters
| Parameter | Value | Description |
|---|---|---|
|
|
DAVIDL |
The Mobile Server user name. |
|
|
100001 |
Transaction ID |
Consolidator.PurgeTransaction("DAVIDL", 100001);
The emulator must be manually configured by copying files into directories used specifically by the emulator. The emulator also requires that transport be configured for HTTP. Directions for installing Oracle Lite database can be found in Section 2.2.1.2, "Setting Up the EPOC SDK".
It is recommended that you install both the release and debug versions of the Mobile Sync on the EPOC emulator.
To install the debug version of the Mobile Sync on the EPOC emulator:
To install the release version of the Mobile Sync on the EPOC emulator:
Replicating with the EPOC device using HTTP requires the TCP/IP communication protocol. EPOC devices use serial lines for connection to the network. There are multiple ways of configuring TCP/IP over serial lines. This document provides instructions for enabling TCP/IP communications for handheld devices using Windows NT RAS. Since the emulator is using the machine hosting it as a RAS server, you will need to connect two serial ports on the host system with a null-modem cable, assigning one port to the emulator, and one to the server using the steps described in Section 3.7.3, "Configuring Transport on a Device".
Start the Mobile Client on the emulator by selecting the Extras menu, and the mSync icon.
Mobile Sync Client for EPOC uses the following parameters to sync:
Table 3-21 Mobile Client Parameters
|
Important: The Sample Orders demo is used in this chapter to demonstrate replication. This sample demo must be installed separately. See the Oracle9i Lite Installation and Configuration Guide for information on installing the Sample Orders demo application. See Chapter 4, "Sample Orders Application" for more information about the Sample Orders demo. |
Use the following user name and password to make use of the SAMPLE11 sample application. A separate user name and password must be provided for any custom made applications and user snapshots.
A progress bar appears to indicate the completion of each synchronization task: composing, sending receiving, and processing. The progress bar also displays the time each task took to complete. If synchronization executes successfully, the synchronization Success screen appears. If synchronization fails, a "sync failed" message appears. To determine the cause of a failed synchronization the server administrator can view tracing information in the Mobile Server log file.
Once you configure transport between Mobile Sync and the device, you must install and configure the Mobile Sync on the device. When setting up the Mobile Sync on the EPOC device or the EPOC emulator, you must first install the client, and then configure it.
To run Oracle Lite applications on the EPOC device, you must install the required .dll files. The .dll files are packaged in an installation file (olite.sis) which is installed on your PC with Oracle Lite for EPOC.
To install the Oracle Lite .dll files on the EPOC device:
The Select Installation File dialog appears.
The PsiWin utility downloads the files to the System\Libs folder on the EPOC device.
After synchronization, the Mobile Sync does not automatically re-enable PC Link on the EPOC device. To re-enable the PC Link, press Ctrl-L.
The PsiWin utility downloads the files to the System\Libs folder on the EPOC device.
The Mobile Sync downloads and formats data from the Mobile Server. Before you can synchronize data between the Mobile Server and the Mobile Sync, you must configure the transport between them.
Mobile Server can use HTTP as a transport method for EPOC devices via Mobile Server. Replicating with the EPOC device using HTTP requires the TCP/IP communication protocol. EPOC devices use serial lines for connection to the network. There are multiple ways of configuring TCP/IP over serial lines including the following: Windows NT RAS, Windows 95/98 dial-up, DigiBoard Port Servers, Unix serial connections, Symbol's multi-cradle boards, and ISP's dial-up over modems. This document provides instructions for enabling TCP/IP communications for handheld devices using Windows NT RAS.
To enable TCP/IP communications between handheld devices and your Windows NT server using Windows NT RAS, perform the following:
|
Important: You must ensure that the TCP/IP addresses in your selected range are not already in use by other computers in your network. |
You can configure transport for the EPOC device using HTTP. This section describes the process for configuring HTTP transport with Windows NT RAS using a serial cable connection.
To configure the EPOC device for HTTP:
The EPOC device is now configured for HTTP transport.
To configure the Mobile Sync on the EPOC device:
The Mobile Sync application starts.
Mobile Server contains system catalog views for locating Mobile Server components. You should not change the system catalog views without using the Mobile Server Admin API. Use the Mobile Server system catalog views to locate the following:
See Appendix A, "Mobile Server System Catalog", for more information.
|
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|