Application
Deployment | MI Web Console
Deployment During Development
The standard way for deploying mobile applications in productive environments
is via the Web AS. Applications are assigned to users in the MI
Web Console and are installed automatically on the mobile device at synchronization.
During the development phase, this deployment procedure is not appropriate,
because it slows down the test cycle for applications. Due to special features
of the standard deployment procedure (that means triggered by Web AS), it is
still necessary to deploy applications once via the standard way. Subsequent
deployments of the application can happen via the MDK plug-in or deployment
can be avoided entirely and the application directly be started and debugged
from within Eclipse.
Why MI Deployment is different from Tomcat deployment
When applications are deployed via the Web AS, some additional steps are performed
the steps are performed that are not done when the application is deployed via
the MDK Plug-in for Eclipse:
- Device ID
On first synchronization of a device with the Web AS, the Web AS computes
a unique device ID that serves to identify the device. The device ID is very
important for the multi-user
support of MI.
- Conversation ID
On application deployment via the Web AS, a so-called Conversation ID is issued.
The Conversation ID describes the triple application-device-user on the Web
AS. The Web AS and the MI Client hold copies of the Conversation ID. The Conversation
ID is also unique and will govern what users can actually see the application
on the mobile device. The Conversation ID is also very important for the initialization
of applications. Application initialization is incomplete when no Conversation
ID exists for the application. The Conversation ID is stored in the <MI
root>/settings/convid folder and may not be changed.
- User existence check
Anyone can log onto a mobile device with an arbitrary password. This does not
cause any harm, as such a user would not see any applications and hence could
not do anything on the device. On synchronization, the user's existence and
the validity of her password is checked by the Web AS. Users that have not
yet been validated by the Web AS are marked as temporary users by the MI Client.
Due to these three steps, applications need to be deployed at least once
via the Web AS to be fully initialized. Some very simple applications that do
not make much use of MI Client, may work fine even when not deployed via the
Web AS, but for exploiting all features of MI, the application needs to be properly
initialized and hence registered with the MI Client. Examples of such simple
applications are the first three examples in the Getting started section.
After such an initial server-side deployment, the application files can be
replaced without MI Client noticing it. This fact is used by MDK plug-ins: when
you export a project as a .war file and run it, the application's sub folder
under <MI root>/webapps is deleted and the new web archive copied to <MI
root>/webapps. On restart of MI, Tomcat extracts the file to <MI root>/webapps/<archive
name>. The application's registration with the MI Client remains untouched
by this procedure.
Deployment procedure during development
Deployment via Web AS
For deploying an application via the Web AS, some simple administrator steps
need to be performed:
- Creating the war file
If no application war file yet exists, the war file can be created via the
MDK plug-in. Otherwise, an existing war file can be renamed and be used. The
war file's content is not important at this stage, as the application folders
can be changed entirely, once this initial deployment was successful.
- Uploading the war file to the Web Console
The war file needs to be uploaded to the Web Console. For this, you need to
logon to the MI Web Console, switch to to the Upload Application tab strip
and press the button Upload Application. In the dialog, fill the technical
name of the application, its short text for the MI homepage, its version,
its runtime type (JSP/AWT) and the application type 'application'. You then
browse to the file location and upload the file. The application is then ready
for deployment.
- Assigning the application to your user
To assign the application to your user, select the Administration tab, then
the view ' Administer Mobile Devices' and click 'Add entries'. You can then
add your user name and find the application via the button at the right of
the input field for the application name. If you check the 'To all devices'
flag, the application will always be deployed to all devices you're using.
- Synchronization and restart
Synchronize to download the application. You'll need to stop and restart your
MI Client in order to finalize deployment.
Deployment from Eclipse
Once this initial deployment cycle has been performed, subsequent deployments
can be started from within Eclipse using the MDK Plug-In's Export
functionality or by selecting Run -> Run.