7.3 Application and Plugin Descriptors

XMA-Application's are seperated into components and plug-ins. There may be other modules or layer's within the application, not visible to the client. Any XMA-Application will describe it´s xma-components and plug-in´s within dedicated descriptor files. This descriptors will be used by the xma-runtime basically by the client´s boot runtime. These descriptors are XML-Based.

One central descriptor filexma-app.xml (Application Descriptor) describes the core application, its required files, components and interface versions.

Additionally descriptor files for plugins may exist. They are called plugins.xml (Plugin Descriptor) and are optionally available. This can be used to include plugins that are delivered from 3rd parties.

All descriptors are located in the root directory of the XMA-WebApplication (XMA-WAR-File).

The application descriptor is used by the xma runtime and boot runtime. It describes the application from a client´s viewpoint. XMA-Applications are built up by " Components" .

A component may contain one or more XMA-Dialog´s.

The root elements for a xma application are:

Since XMA Bootruntime 1.7.0, the code of the bootruntime itself is independent of SWT. Each XMA application my declare which SWT version it wants to use. The optional tag swt-description is used for this declarations.

An application may declare, that it wants to be executed with SWT 3.1.1. This is done the following way:

<swt-description>
   <preinstall version-number="3.1.1" />
</swt-description>
This application will be executed with SWT 3.1.1.

It is possible to give more than one SWT version number. The order of the version numbers is relevant. SWT will try to use the first SWT version. If it is not installed on client side, the next SWT version is tried. If no declared SWT version is found, the default SWT version will be used. For XMA Bootruntime 1.7.0 the default SWT version number is 3.1.1.

<swt-description>
   <preinstall version-number="3.2.0" />
   <preinstall version-number="3.1.1" />
</swt-description>
There is even a possibility to use an SWT version which is not allready installed on the client side. You can specifiy the needed files of SWT as resources. These resources are downloaded, cached and used if none of the SWT versions declared with <preinstall> tags are found on client side. You have to package the declared resources into your webapplication. Of course sharing of resources between applications and delta downloads are possbile here, too.

<swt-description>
   <preinstall version-number="3.1.1" />
   <resource href="swt/swt.jar" type="jar" version="" shared="true"/>
   <resource href="swt/swt-nl.jar" type="jar" version="" shared="true"/>
   <resource href="swt/swt-awt-win32-3139.dll" type="lib" version="" shared="true"/>
   <resource href="swt/swt-gdip-win32-3139.dll" type="lib" version="" shared="true"/>
   <resource href="swt/swt-win32-3139.dll" type="lib" version="" shared="true"/>
</swt-description>
The rules for the decision, which SWT version to use are as follows:

  1. If no swt-description is given in xma-app.xml the default SWT version is used.

  2. The SWT-versions defined in preinstall tags are tried in the order given. The first one found installed on client side is used.

  3. If no preinstall tag is presend or none of the SWT-versions defined in preinstall tags was found, all the given resources are downloaded and used by the classloader. There is no order defined on the resources. If not all resources could be downloaded successfully, the application fails.

  4. If no resources are defined, the default SWT version is used.

If components of different server side web applications are integrated into one client side application, only the first web application can decide which SWT version to use for the whole client side application. SWT descriptions of the other web applications will be ignored.

Plugin Descriptors can only specify plugin-impl declarations. Although the DTD would allow component definitions, they are ignored by the runtime if existing.