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:

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.