Skip Headers
Oracle® Database Lite Administration and Deployment Guide
10g (10.0.0)
Part No. B12262-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

16 Offline Instantiation

This document discusses the Offline Instantiation feature. Topics include:

16.1 Overview

The Offline Instantiation (OLI) utility enables mobile administrators to prepare a package which includes the Mobile Client software and initial data for every mobile user in batch mode. In offline mode, this package can be used to set up a Mobile Client with user-specific initial data within Oracle Database Lite. This procedure helps users avoid an expensive online synchronization process as part of the first time Mobile Client setup procedure.

16.2 Setting Up the Mobile Server Host and Mobile Development Kit Host

To set up the Mobile Server host and the Mobile Development Kit (MDK) host, perform the following steps.

  1. Install the Mobile Server and Mobile Development Kit.

  2. Start the Mobile Server.

  3. Create the requisite clients, publications, and subscriptions on the Mobile Server. Subsequent operations such as Mobile Client installation and OLI command execution must be carried out on the MDK host. The MDK host contains a sample OLI configuration file named oli.ini and the OLI batch file named oli.bat at the following location.

    &fmv642;\Mobile\Sdk\bin

16.3 Setting Up the Mobile Client Root Directory

To set up the Mobile Client Root directory, perform the following steps.

  1. Download setup.exe from the Mobile Server setup page, which is available at the following URL.

    http://<mobile_server>:<port>/webtogo/setup

    This step is necessary to establish the correct directory structure and to ensure that the appropriate Oracle Database Lite binaries are used when creating the client bundles for a particular platform.

    Choose the appropriate Oracle Database Lite Mobile Client. For example, choose Branch Office for Branch Office applications, Mobile Client for Web-to-Go for web applications, Mobile Client for Web-to-Go (BC4J Support) for web applications with BC4J support, and the Mobile Client for Win32 for Win32 and WinCE applications.


    Note:

    To set up the Mobile Client on the WinCE (Pocket PC) platform, choose the Mobile Client for Win32.

  2. Run setup.exe and specify an installation directory for the Mobile Client. The install directory specified during this process is defined as MOBILECLIENT_ROOT in the OLI configuration file (oli.ini). Once the client directory is established, the configuration file should be updated accordingly. All client databases will be instantiated in this directory. Hence, it is important to ensure adequate disk space availability.

  3. Ensure that the Mobile Client successfully synchronizes with the Mobile Server. Using the mSync.exe application (or the Web-to-Go client if it is the designated platform), initiate the synchronization process for one of the subscribing clients. It may be necessary uninstall the existing Mobile Client before running the Mobile Client setup.exe. Synchronizing before offline instantiation accomplishes two things. The synchronization process validates the setup and downloads any application files that are associated with the subscription that should be included in the client bundle.

16.4 Setting Up the Mobile Client (Distribution) Root Directory

To set up a Mobile Client (Distribution) Root directory, use the same setup.exe (used for the client installation), and execute the program on the Command Line as follows.

setup.exe -d

The distribution directory specified during this process is defined as MOBILECLIENT_CD_ROOT in the OLI configuration file (oli.ini). Once the distribution directory is established, the configuration file should be updated accordingly.


Note:

Ensure that the MOBILECLIENT_CD_ROOT distribution directory and the MOBILECLIENT_ROOT directory are different directories.

16.5 The OLI CD's Directory

The OLI CD's directory is a location where all the client packages are placed during the offline instantiation process. This directory must be located on a drive with adequate free disk space for all client databases. In the file oli.ini, this directory is called OLI_CDS_ROOT.


Note:

Ensure that this directory is different from MOBILECLIENT_CD_ROOT and MOBILECLIENT_ROOT as specified in previous steps.

16.6 The OLI Configuration File: Oli.ini

In the file oli.ini, you must indicate the location of the Mobile Client Root, Mobile Client CD Root, OLI CD Root, and a list of users requiring offline instantiation to the OLI engine. The sample configuration file is available on the MDK host at the following location.

<Oracle_home>\Mobile\Sdk\bin\

The content of this file is given below.

#########################################################################
#	
# OLI.INI
# Oracle 10g Lite Offline Instantiation Configuration File
# Copyright © 1997-2004 Oracle Corporation.
# All Rights Reserved.
#
#########################################################################
#
# There are two sections whose names are enclosed in square 
# brackets: [SETUP] and [CLIENTS].
# Lines starting with a "#", ";", "--" or "//" are comments.
#
 
#
# Site specific parameters.
# The format for this section is <PARAMETER> = <VALUE>
#
[SETUP]
 
#
# The mobile server name or IP. If on a port other than 80, append ":<port>".
# Sync server need be running when OLI is launched.
#
MOBILE_SERVER=hostname.domain:80
 
#
# If the mobile server port specified above is secure, set "USE_SSL" to "YES".
# Otherwise, use "NO".
#
USE_SSL=NO
 
#
# The mobile server database repository JDBC URL, mobileadmin schema and password
#
JDBC_URL=jdbc:oracle:thin:@hostname.domain:1521:oid
SCHEMA=MOBILEADMIN_SCHEMA
PASSWORD=MOBILEADMIN_PASSWORD
 
#
# The method used to populate client databases. Valid values are "SYNC" and "JDBC".
# "SYNC": use client-server synchronization to generate ODBs.
# "JDBC": use JDBC to transfer data from server repository to client.
# If clients subscribe to same data for some tables, "JDBC" is faster since they are 
# transferred only once for all clients.
#
MAKEODB_METHOD=JDBC
 
#
# The JDBC driver type for the connections to Olite client databases. Valid values are "NATIVE" and "ODBC".
# "NATIVE": use Olite native driver.
# "ODBC": use SUN JDBC-ODBC bridge.
#
OLITE_JDBC_DRIVER=NATIVE
 
 
#
# The destination directory for the Olite mobile client installation.
# This is the directory when you run "setup.exe" without any options.
#
MOBILECLIENT_ROOT=C:\MOBILECLIENT
 
#
# The directory of the Olite mobile client installation CD.
# This is the destination directory when you run "setup.exe" with an option "-d".
#
MOBILECLIENT_CD_ROOT=C:\MOBILECLIENT_CD
 
 
#
# The Directory where OLI puts the client instantiation packages.
# Under this directory, each instantiated client will have a sub directory
# which can be copied to a CD to be used for mobile client installation 
# on the client machine. Client ODBs are included.
#
OLI_CDS_ROOT=C:\OLI_CDS
 
#
# The device type of the targeted mobile client machines.
# Use "WIN32" for win32 native, 
# use "WTG" for webtogo client deployments and
# use "WCE" for pocket pc  
#
DEVICE_TYPE=WIN32
 
#
# The number of clients to be processed concurrently  
#
THREADS=1
 
#
# List of clients to be instantiated. The clients must have been created 
# on the mobile server.
# The format for this section is <CLIENTID> <PASSWORD> 
# Passwords are required
#
[CLIENTS]
 
CONSC1 MANAGER
CONSC2 MANAGERCONSC3 MANAGERCONSC4 MANAGERCONSC5 MANAGERCONSC6 MANAGERCONSC7 MANAGERCONSC8 MANAGERCONSC9 MANAGERCONSC10 MANAGERCONSC11 MANAGERCONSC12 MANAGERCONSC13 MANAGERCONSC14 MANAGERCONSC15 MANAGERCONSC16 MANAGERCONSC17 MANAGERCONSC18 MANAGERCONSC19 MANAGERCONSC20 MANAGER

16.7 Using the OLI Engine

The OLI engine is a java class named oracle.lite.sync.OLI_Win32. It reads the file oli.ini in the current directory for information related to configuration settings. It also uses two repository tables which store information related to resuming OLI tasks, during interruptions or failures. These tables are C$OLI_CLIENTS and C$OLI_SETUP.


Note:

Before launching the OLI engine, you must edit the oli.ini file. The OLI engine uses two repository tables that store information related to resuming OLI tasks during interruptions or failures. These tables are C$OLI_CLIENTS and C$OLI_SETUP.

The OLI engine relies on a few java classes and native libraries. To make the java libraries and native libraries accessible to the OLI engine, the software contains a batch file named oli.bat, in which the necessary environment variables are set. Using the oli.bat file is recommended instead of directly using the class named oracle.lite.sync.OLI_Win32.

To launch the OLI engine using the Command Prompt window, locate the directory <Oracle_home>\Mobile\Sdk\bin and execute the oli.bat file at the Command Line. This action displays the following usage information.

        Usage
        -----
        oli.bat [-g] [makeodb] [package] [cleanup] [check status]
            -g  Debug mode

To carry out OLI tasks, re-execute the command using the appropriate switches and arguments. The arguments are also called sub-commands.

16.7.1 Using Sub-Commands

The OLI engine provides sub-commands that enable you to create and populate the client database files, create packages for mobile clients, and cleanup OLI tables. As a normal practice, execute them in the given order. The following sub-commands correspond to sub-tasks. These sub-commands, together with the status tables, enable you to resume a sub-task in case of failure or interruption. They are:

16.7.1.1 makeodb

Creates and populates the client 'odb' files.

Usage

oli.bat [-g] makeodb

The initial status of a client in the repository table C$OLI_CLIENTS is RESET. After a client is processed successfully by the sub-command makeodb, its status changes to ODBMADE or SLUG.


Note:

Before executing the sub-commands makeodb and package on WinCE or Win32 devices, ensure that you set the DEVICE_TYPE parameter to WCE or Win32 in the oli.ini file.

16.7.1.2 package

The sub-command package creates a package for each client in the directory specified by the parameter OLI_CDS_ROOT in the oli.ini file. Each client's package is contained in a sub-directory, which is named after the client name.

Usage

oli.bat [-g] package

After a client package is successfully processed by the sub-command package, its status is changed to PACKAGED.

16.7.1.3 cleanup

The sub-command cleanup cleans the OLI tables. To re-create the OLI tables, run the "cleanup" command first. Do not run this command without a need to start again. There is an additional command "checkstatus" which you can run to check the status of OLI clients.

Usage

oli.bat [-g] cleanup

16.8 Deploying on Client Machines

The deployment process for WinCE applications are different from those of native Win32 applications and Web-to-Go applications.

Deploying Win32 Native and Web-to-Go Applications

To deploy on client machines for native Win32 applications and Web-to-Go applications, perform the following steps.

  1. After a successful server side OFF_LINE INSTANTIATION process, each client is provided with a one-click installable package in the directory specified by the parameter named OLI_CDS_ROOT in the oli.ini file. The client's sub directory (package) is named after the client name. Copy the client's package to the client machine.

  2. On the client machine, perform the following:

    1. Uninstall existing Mobile Client software.

    2. From the available package, run setup.exe.

Deploying WinCE Applications

To deploy on client machines for WinCE applications, perform the following steps.

  1. Install the Mobile Client for Windows CE onto the CE device.

  2. After a successful server-side OFF_LINE INSTANTIATION process, each client contains a package in the directory, which is specified by the parameter OLI_CDS_ROOT in the oli.ini file. The client's sub directory (package) is named after the client name. Copy the client's package to the <Oracle_home> directory of the WinCE device.