A Mobile Client Configuration Parameters

You can customize the mobile client by modifying the parameter values defined in the OSE.INI configuration file.

The installation automatically sets the parameters in the OSE.INI file, but you can modify them to customize the product behavior. To modify these files, use an ASCII text editor. You must have write permissions on the directory where either file is located to be able to modify them.

Note:

On the Windows Mobile and Blackberry platforms, these files are named with the extension of .TXT, so that you can double-click on it to open the file.

The following sections detail the parameters within the OSE.INI and DEVMGR.INI configuration files:

A.1 OSE.INI File Overview

The OSE.INI file stores properties used by the mobile clients. It contains parameters that define the location of the mobile client database and mobile client files, defines parameters for all databases on a system, and how to customize synchronization for the mobile client database. There is a single OSE.INI file for each mobile device for all users of that device. On Windows, Linux and Windows Mobile platforms, the latest modifications to parameters in the OSE.ini file take effect only after restarting the mSync, Sync Agent and dmagent programs. On Pure Java Client supported platforms, the latest modifications to parameters in the OSE.ini file take effect only after restarting the application embedding the Sync engine.

Note:

The installation automatically sets the parameters in your OSE.INI file, but you can customize the mobile client by modifying the parameter values defined in your OSE.INI file. You must have write permissions on the directory where this file is located to be able to modify the OSE.INI file. To modify the OSE.INI file, use an ASCII text editor.

Depending on the platform, the OSE.INI file can be located in one of the following directories on the mobile device:

  • On Win32, Windows Mobile and Linux platforms, the OSE.INI file is located in the <mobile_client_install_root>\bin directory.

  • On Windows Mobile, the OSE.TXT file is located in the <mobile_client_install_root>\bin directory.

  • On Blackberry, the OSE.TXT file is located in the /store/home/user/oracle/sync directory.

  • On Android, the OSE.INI file is located in /data/data/<application_package>/app_oracle.sync. Applications import the osync_android.jar library; thus, the <application_package> should be replaced with the user's application that invokes the OSESession APIs.

  • On Java SE and Java ME platforms, the OSE.INI file is located in <mobileclient>, where you install and place the Java SE archive file (e.g. osync_se_bdb.jar, osync_se_sqlite.jar, osync_se_javadb.jar andosync_me.jar).

  • On iOS, ose.ini file is located within the application sandbox in the mobile client directory which is "Library/Application Support/oracle" (relative to the sandbox root).

Note:

The user cannot modify files within application sandbox, so the only way to access and modify ose.ini file for iOS client is by using OSE APIs oseSetParam() and oseGetParamNC() within your application. For more information, see section 3.1.1.2.14 of the Mobile Server Develoeper's Guide.

The following are the parameter sections for the OSE.INI file:

A.1.1 OSE Parameters - OSE

The following are the OSE parameters:

A.1.1.1 Resume Parameter - RESUME

The RESUME parameter specifies whether the resume transport is enabled.Values are YES, TRUE, NO or FALSE.

Syntax

OSE.RESUME=YES|NO|TRUE|FALSE 

A.1.1.2 Files Parameter - FILES

The FILES parameter specifies whether files are used to temporarily store the data before it's sent/after it's received. Values are YES, TRUE, NO orFALSE.

Syntax

OSE.FILES=YES|NO|TRUE|FALSE 

A.1.1.3 Encryptdb Parameter - ENCRYPTDB

The ENCRYPTDB parameter specifies whether databases newly created during sync should be encrypted. Values are YES, TRUE, NO or FALSE.

Syntax

OSE.ENCRYPTDB=YES|NO|TRUE|FALSE 

A.1.2 SQLite Mobile Client Parameters—SQLITE

The SQLITE section configures certain aspects of both the Berkeley DB and SQLite Mobile Clients. The following sections describe the mobile client parameters that you can modify:

A.1.2.1 DATA_DIRECTORY

The location of client database files is determined by the DATA_DIRECTORY parameter in the OSE.INI file.

  • If the DATA_DIRECTORY parameter is not specified, the default value is as below

    • For SQLite on Win32, Linux and pure Java SE:<MOBILE_CLIENT_HOME>/sqlite/sqlite_db

    • For Berkeley DB on Win32, Linux and pure Java SE: <MOBILE_CLIENT_HOME>/bdb/data

    • For SQLite and Berkeley DB on Windows Mobile: \OraCE\sqlite_db

  • Mobile Client database files, Oracle Database Mobile Server repository files, and temporary synchronization data are stored in the DATA_DIRECTORY/<user> directory, where <user> is the synchronization user id. The database repository files are named with the .db extension, such as TERRY\mysqlite.db. These files are used to manage the change control for transactions and synchronization for the user.

  • Internal settings and parameters for the Mobile Client is stored in the <mobileclient>/bin/oseconf directory.

Example

Example of configuring the client database directory on a Win32 platform for Berkeley DB and SQLite:

SQLITE.DATA_DIRECTORY=C:\mobileclient\sqlite\sqlite_db

Example for setting the directory on a Linux platform:

SQLITE.DATA_DIRECTORY=/mobileclient/sqlite/sqlite_db

Example for setting the directory on a Blackberry:

SQLITE.DATA_DIRECTORY=file:///SDCard/databases/my_app

A.1.2.2 QUEUES

The QUEUES parameter specifies which type of snapshots the client will use in tracking the changes for Berkeley DB and SQLite databases. The following lists the two snapshot types:

  • Queue-based: Both client and server changes are stored in a single queue. Whenever the snapshot is not locked by an application, the synchronization retrieves data from the In Queue and applies it to the base snapshot. At this point, the synchronization propagates data from the Out Queue to the server.

    Although both snapshot types rely on triggers, queue-based snapshots allow concurrent operations on Berkeley DB and SQLite databases while any synchronization is in progress. The Sync Agent's compose operation places modified data into the Out Queue. Later, the Sync Session uploads multiple client transactions delineated by a unique transaction id to the server.

    Set this type with QUEUES=YES.

  • State-based. State-based snapshots decipher the difference in the state of the data between subsequent synchronization events. This snapshot type is more resource efficient than queue-based snapshots. To enable state-based snapshots, set the QUEUES parameter in the OSE.INI file to NO.

Syntax

SQLITE.QUEUES=YES|NO 

A.1.2.3 LIMIT_CONNECTIONS

Set LIMIT_CONNECTIONS to YES when you want to limit the number of concurrent connections used by synchronization. Setting this parameter to YES keeps alive only the minimum required number of connections. If the QUEUES parameter is set to YES, the minimum number of connections necessary for synchronization is 2. If QUEUES is set to NO, only a single connection is required.

Setting the LIMIT_CONNECTIONS parameter is a trade-off between performance and memory limitations. This parameter is set to YES by default on all Blackberry devices for conserving memory.

Syntax

SQLITE.LIMIT_CONNECTIONS=YES|NO 

A.1.2.4 JDBC.DRIVER and JDBC.URL_PFX

These parameters are used for Pure Java (PJ) SE and Pure Java ME clients to specify which JDBC driver is used by the client. These settings in ose.ini should be permanent and not be changed unless the client is removed and reinstalled. For more information on the values of these parameters for SQLite and Berkeley DB clients, see Section 5.1, "OSync Utility".

A.1.3 Java DB Mobile Client Parameters — JAVADB

The JAVADB section configures certain aspects of Java DB Mobile Clients. The following sections describe the mobile client parameters that you can modify:

A.1.3.1 DATA_DIRECTORY

The location of Java DB database files is determined by the DATA_DIRECTORY parameter in the OSE.INI file. If the DATA_DIRECTORY parameter is not specified, the default value is <mobileclient>/javadb_home. Additionally, the Mobile Client database files, the Oracle Database Mobile Server repository files, and the temporary synchronization data are stored in the DATA_DIRECTORY/<user> directory, where <user> is the synchronization user id.

Example:

Example for setting the directory on a Win32 platform:

JAVADB.DATA_DIRECTORY=C:\mobileclient\javadb_home 

Example for setting the directory on a Linux platform:

JAVADB.DATA_DIRECTORY=/mobileclient/javadb_home

A.1.3.2 QUEUES

The QUEUES parameter specifies which type of snapshots the client will use in tracking the changes for Java DB databases. This parameter works the same way as the parameter SQLITE.QUEUES. Default value of this parameter is TRUE.

Syntax:

JAVADB.QUEUES=YES|NO

A.1.3.3 SHUTDOWN_ON_CLOSE

The SHUTDOWN_ON_CLOSE parameter controls if the Pure Java Sync engine should shut down the Java DB engine when it closes. Default value of this parameter is NO.

Syntax:

JAVADB.SHUTDOWN_ON_CLOSE=YES|NO

A.1.4 Berkeley DB Mobile Client Parameters—BDB

This section provides information on:

A.1.4.1 LARGE_RECORD_OPT

Setting LARGE_RECORD_OPT parameter will pass 'pragma large_record_opt' to the Berkeley DB database. This enables optimized storage of large records. Any record larger than the given number of bytes will be stored in a new format that improves read and write performance for large records.

For more information on 'large_record_opt' pragma, refer to Oracle Berkeley DB Getting Started with the SQL APIs document.

By default, this parameter is not set, and large record optimization in the Berkeley DB database is disabled.

Syntax

BDB.LARGE_RECORD_OPT=<value>

A.1.4.2 Enable/Disable Ch-Werner JDBC Driver Parameter - STREAMING

The STREAMING parameter is used by the Pure Java (PJ) SE client, the Android client and the OJEC client. This parameter specifies whether to use the Ch-Werner Java wrapper or the Ch-Werner JDBC driver to access the client database by choosing YES to use the Ch-Werner Java wrapper and NO to use the Ch-Werner JDBC driver. The default value of this parameter is NO.

The parameter is applicable to Berkeley DB Android client, Berkeley DB SE and SQLite SE clients and Berkeley DB OJEC client.

The Ch-Werner driver has the following two components:

  • Ch-Werner Java Wrapper:

    A JDBC driver over the Java wrapper.

  • Ch-Werner JDBC Driver:

    A Java wrapper with a Java Native Interface (JNI) layer over the SQL API.

The WERNER parameter determines the entry point in the stack. See below:

Table A-1 Entry Points of the WERNER Parameters

Parameter Value

Ch-Werner JDBC Driver

BDB.STREAMING=FALSE

Ch-Werner Java Wrapper

BDB.STREAMING=TRUE

SQL API

Used for native clients


Syntax

BDB.STREAMING=YES|NO

Note:

If you are using the Java wrapper, then empty blobs are supported.

If you are using the JDBC driver, then empty blobs are not supported.

When using the JDBC driver with an empty blob, an 'OPERATION_NOT_SUPPORTED' error is returned. As a workaround, store a null in the blob initially.

A.1.5 Background Sync Parameter—BGSYNC

The DISABLE parameter specifies whether the Sync Agent is disabled. Values are YES or NO. Disabling the Sync Agent prevents any automatic synchronization to be initiated for any user on this SQLite or BDB Mobile Client.

Syntax

BGSYNC.DISABLE=YES|NO 

A.1.6 Network Parameters - NETWORK

This section provides information on:

A.1.6.1 DISABLE_SSL_CHECK

This ose.ini parameter is only for Pure Java (Android, Blackberry, SE, ME) and iOS clients. For other clients use the corresponding parameter in devmgr.ini (see section A.2.2.2).

Specifies whether the client can use certificates from mobile server that are not signed by trusted authority, such as self-signed certificate. The values are YES and NO, with NO being the default.

Set this parameter to YES if you want to use self-signed certificate for SSL encryption, but not to perform SSL authentication.

Syntax

NETWORK.DISABLE_SSL_CHECK=YES|NO 

A.2 DEVMGR.INI File

The DEVMGR.INI file contains mobile client parameters for Device Management in the DMC section and the network parameters in the NETWORK section. For more information on device management parameters that can be modified before installing the client, see Section 7.2, "Configuring Mobile Clients Before Installation" in the Oracle Database Mobile Server Administration and Deployment Guide.

The following sections describe the parameters for the DMC and Network sections:

A.2.1 Device Management Parameters—DMC Section

The Device Management parameters are as follows:

A.2.1.1 DISABLE_PROMPT

The DISABLE_PROMPT parameter accepts a TRUE or FALSE value, which causes the following action:

  • TRUE: The device checks for software updates available on the server. If updates are available, these are brought down to the client and installed.

  • FALSE: The device checks for software updates available on the server. If updates are available, the option to bring down the updates and install them is displayed to the user, who decides what action to take. If the client chooses to update, then these are brought down to the client and installed.

A.2.1.2 PUSH_PORT

The port number on the mobile device that accepts device management commands from the mobile server. By default, the port number is 8521. Do not modify on the client. Even though it is described here, you should only modify the PUSH_PORT variable in the INF file BEFORE the mobile client is installed. For more information, see Section 7.2, "Configuring Mobile Clients Before Installation" in the Oracle Database Mobile Server Administration and Deployment Guide.

A.2.1.3 UPDATE_DAY and UPDATE_TIME

The day and time to check for software updates for the client. You can modify day and time here or within the DMAgent UI. For more information on the DMAgent UI, see Section 7.7, "Using the Device Manager Agent (dmagent) on the Client" in the Oracle Database Mobile Server Administration and Deployment Guide. If you do want to modify them here, the values are as follows:

Day when the device checks for software updates. Used in combination with UPDATE_TIME. UPDATE_DAY takes 0 - 8 which translates to the following days:

  • Never = 0

  • Daily = 1

  • Sunday = 2

  • Monday = 3

  • Tuesday = 4

  • Wednesday = 5

  • Thursday = 6

  • Friday = 7

  • Saturday = 8

Time of day that the device checks for software updates from the mobile server. Used in combination with UPDATE_DAY. UPDATE_TIME can take values 0 - 23 which translates to the following time:

  • 00:00 = 0

  • 01:00 = 1

  • 12:00 = 12

  • 13:00 = 13

  • 23:00 = 23

A.2.1.4 MAX_RETRY

Integer value that configures the maximum number of retry attempts before abandoning a server command.

A.2.1.5 FREQUENCY

The frequency of how many seconds between the client polls. The DMAGENT connects to the mobile server checking for new commands at the defined FREQUENCY interval.

A.2.1.6 DEBUG

If you turn on the DEBUG parameter in the [DMC] section, then this turns on the debugging for the device manager. All device manager debug messages are written to the _dmdebug.txt file.

To enable, set the DEBUG parameter in the [DMC] section to 1. Set to 0 to turn off debug feature, which is the default.

Default value: 0

A.2.2 Network Parameters—NETWORK Section

The following parameter configures how the client interacts over the network:

A.2.2.1 SERVER_URL

This parameter points to the mobile server. It communicates with the mobile server over HTTP or HTTPS. The expected syntax for the SERVER_URL parameter is as follows:

HTTP://<host>:<port>/mobile

For example:

[NETWORK]
SERVER_URL=HTTPs://myhost:8888/mobile

A.2.2.2 DISABLE_SSL_CHECK

For Pure Java and iOS clients use the corresponding parameter in ose.ini. For more information, see Section A.1.6.1, "DISABLE_SSL_CHECK".

You can use certificates that are not signed by a trusted authority, such as a self-signed certificate, on the mobile server. Set the following parameter in the NETWORK section on the client device:

[NETWORK]
DISABLE_SSL_CHECK=YES

This parameter enables the client to use the self-signed certificate for SSL encryption, but not to perform SSL authentication.

A.2.2.3 HTTP_PROXY

If user has a proxy between the mobile client and the mobile server, then in order for the Device Manager (dmagent) to access the mobile server to poll for command, then configure this parameter to the proxy server URL, including port number.

Format is <hostname>:<port>, as follows:

[NETWORK]
HTTP_PROXY=proxy.foo.com:8080

A.3 Sample OSE.INI and DEVMGR.INI Files

The following content is displayed from a sample OSE.INI file.

SQLITE.DATA_DIRECTORY=C:\mobileclient\sqlite
SQLITE.QUEUES=YES
OSE.RESUME=NO 
BGSYSNC.DISABLE=NO 

The following content is displayed from a sample DEVMGR.INI file.

[NETWORK]
DISABLE_SSL_CHECK=YES
HTTP_PROXY=proxy.foo.com:8080