| Oracle® Database Lite SQLite Mobile Client Guide Release 10.3 Part Number E16214-01 |
|
|
View PDF |
You can customize the SQLite Mobile client by modifying the parameter values defined in two configuration files: OSE.INI and POLITE.INI.
The installation automatically sets the parameters in both the OSE.INI and POLITE.INI files, 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 WinCE 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 describes the configuration files for the SQLite Mobile client:
The OSE.INI file contains parameters that define the location of the SQLite database and SQLite Mobile client files, and how to customize synchronization for the SQLite database. There is a single OSE.INI file for each mobile device for all users of that device. The latest modifications to parameters in the OSE.INI file take effect only during a manual synchronization or after restarting the Sync Agent for automatic synchronization.
Depending on the platform, it can be located in one of the following directories on the mobile device:
On native clients, the OSE.INI file is located in <mobile_client_install_root>\sqlite. On WinCE, this file is named OSE.TXT.
On Blackberry, the OSE.TXT file is located in /store/user/home/oracle/sync.
On Android, the OSE.INI file is located in /data/data/<application_package>/app_oracle.sync.
Applications import the mSync.jar library; thus, the <application_package> should be replaced with the user's application that invokes the OSESession APIs.
The following are the parameters for the OSE.INI file:
By default, the location of the SQLite database is determined by the SQLITE.DATA_DIRECTORY parameter in the OSE.INI file. However, if this parameter is not set, the location of the SQLite database on Win32, WinCE, or Linux platforms is determined by the location of the ospSqlite library.
The SQLite database, Oracle Database Lite repository files, and temporary synchronization data are stored in the SQLITE.DATA_DIRECTORY/sqlite_db/<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 SQLite Mobile client is stored in the SQLITE.DATA_DIRECTORY/oseconf directory.
Example
Example for setting the directory on a Win32 platform:
SQLITE.DATA_DIRECTORY=C:\mobileclient\sqlite
Example for setting the directory on a Blackberry:
SQLITE.DATA_DIRECTORY=file:///SDCard/databases/my_app
The SQLITE.QUEUES parameter specifies which type of snapshots the client will use in tracking the changes on the SQLite database. The following list 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 the SQLite database 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 SQLITE.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. Pure Java clients only support state-based snapshots. To enable queue-based snapshots, set the SQLITE.QUEUES parameter in the OSE.INI file to NO.
Syntax
SQLITE.QUEUES=YES|NO
The OSE.RESUME parameter specifies whether the resume transport is enabled. Values are YES or NO.
Syntax
OSE.RESUME=YES|NO
The POLITE.INI file centralizes database volume ID assignments, defines parameters for all databases on a system, and defines synchronization parameters. On the WinCE platform, the file name is POLITE.TXT.
When you install SQLite Mobile client, the installation for Win32, WinCE and Linux platforms creates the POLITE.INI file in the <mobile_client_install_root>\bin directory.
Since the SQLite Mobile client configuration does not include the SQLite database, all sections except for the All Databases section applies on the SQLite Mobile client. Refer to Appendix E, "POLITE.INI Parameters" in the Oracle Database Lite Administration and Deployment Guide for details on these sections.