Both the MCS policy editors in the Mobile Portal Toolkit workbench and the MCS Server can operate from a multi-file XML repository.
Both the MCS policy editors in the Mobile Portal Toolkit workbench and the MCS Server can operate from a multi-file XML repository.
You can also create the files for a multi-file XML repository from your JDBC repository by using the mcsExport command. If you want to export policies for other projects, use the mcsExport command for each project and specify the name of the project in the command format following example. You should export the policies for each project into a separate directory. Refer to Importing and exporting policy repositories for more information.
In order to make MCS server run on an XML repository the mcs-config.xml file must be set up so that the local-repository contains the xml-repository element.
In the devices section, the location attribute on the file-repository element must contain the path to the device repository directory, or to the device repository file.
In the projects section, the directory attribute on the xml-policies element must contain the path to the project.
<local-repository>
<xml-repository/>
</local-repository>
<devices>
<standard>
<file-repository location="/devices/devicerepositories/"/>
</standard>
</devices>
<projects>
<default preload="true">
<jdbc-policies name="myproject"/>
<assets base-url="/mcs/">
<audio-assets prefix-url="/audio/"/>
<dynamic-visual-assets prefix-url="/dynvis/"/>
<image-assets prefix-url="/images/"/>
<script-assets prefix-url="/scripts/"/>
<text-assets prefix-url="/text/"/>
</assets>
<generated-resources base-dir="myproject"/>
</default>
<project name="http://www.mycorp.com/mcs_policies/marketing">
<xml-policies directory="/mcs-policies/product"/>
<assets base-url="/mcs/">
<audio-assets prefix-url="/audio/"/>
<dynamic-visual-assets prefix-url="/dynvis/"/>
<image-assets prefix-url="/images/"/>
<script-assets prefix-url="/scripts/"/>
<text-assets prefix-url="/text/"/>
</assets>
</project>
</projects>
The example contains the configuration entries used with the XML repository for the Mobile Portal Toolkit. The directory [mptk_home] is where Mobile Portal Toolkit is installed and [wp_root] is the directory where the Mobile Portal Accelerator runtime is installed.
The default project contains the policies for the mobile-portal project.
The XML repository is single-user only. Deploying on a shared file system for use by multiple users will most likely cause the repository to become corrupted at some point.
The initial loading of devices into the repository can cause a noticeable delay of several seconds. This is due to each device being in its own file and the device tree having to be constructed with this information.
There is no built in integrity checking other than for duplicates. So, for example if a new link variant is created with a null device then the repository does not check for this and the result will be a corrupt entry in the file for the link policy in use.