Skip to Content
h3. Introduction There is sometimes a need to run multiple MI clients concurrently on the same device or system. This article describes how to modify or reconfigure copied MI installations to make them runnable concurrently with other MI processes. h4. MI Versions: I used MI 2.5 SP14 (Tomcat and AWT) and SP15 (Tomcat runtime) as the subject installations. Though not tested with other versions and SP level, I think that the same procedures are applicable. h3. Installing Multiple MI Clients Prior to running multiple MI installations concurrently, there should already be several MI installations on your system. It is possible to install multiple MI clients regardless of the underlying runtime (AWT or Tomcat), versions (2.1 or 2.5) and support package levels (SP13, SP15 and so on). There are several ways of installing MI client – one is by using the MI installer or MI zip file distribution, and second is by copying and reconfiguring an existing MI installation. Figure 1 shows a directory image of a multiple MI installations all put into one folder. image Figure 1. Multiple MI insallation directories h4. Installing with the MI installer h4. Using the MI zip distribution MI client has also a ZIP format distribution package. You can just extract the archive to your desired location. However, after extracting the files, there is a need to modify your startup/shutdown scripts to reflect your installation path and the classpath of your libraries. Unlike in the previous method using the MI installer, you have to manually configure your installation and an understanding of the underlying implementation is required. Please refer to the Related Docs (#relatedDocs) section on how to reconfigure an MI installation scripts.

h4. Using an existing MI installation It is also possible to copy and existing MI installation regardless whether if it has been assigned with an Mobile ID and/or installed with an MI application already. It is easier, however, to copy from a fresh installation i.e. an MI installation that is nor yet assigned with a Mobile ID by the middleware since it will not require you to reinitialize it. On the other hand, if you make a copy from an MI installation that is already been synchronizing with the middleware, there is a necessity of reinitializing it. Please refer to the Related Docs (#relatedDocs) section on how to reinitialize an MI installation and how to reconfiguring it to reflect the new installation path. NOTE: +Reinitializing an installation means removing all middleware assigned data such as mobile ID and deployed applications; making it ready for an initial device registration with the middleware.+

h5. a) Copying from fresh MI installation * Copy the whole folder of the newly installed MI client to a desired location. * * [Reconfigure the copied MI installation scripts to reflect the new location path | How to make an MI application name independent]. * * To make another copy, perform step 1-2 * h5. b) Copying from a registered MI installation 1. 2. Copy the whole folder of the an existing MI client to a desired location. 3. 4. [Reconfigure the copied MI installation scripts to reflect the new location path. | How to make an MI application name independent] 5. 6. [Refresh the copied MI installation. | #relatedDocs] 7. 8. To make another copy, perform step 1-3. 9. h3. Configuring MI Installations for Concurrent Execution An MI client (AWT and Tomcat runtimes) opens up a socket port for its services. The following port numbers are used by the normal MI installation. 0.1. 0.2. Port# 45000: CommunicationServer (AWT and Tomcat runtime) 0.3. 0.4. Port# 4444: HttpConnectionHandler service(Tomcat runtime) 0.5. 0.6. Port# 9007: Ajp12ConnectionHandler service (Tomcat runtime) 0.7. If there is one MI client process running, you cannot run another MI instance since there will be port binding problem. For Tomcat runtime, another MI Tomcat process can only be executed, at least, if the HttpConnectionHandler and Ajp12ConnectionHandler service port numbers are not used. For both runtimes – AWT and Tomcat – another MI process can still run regardless whether the CommunicationServer port are unique per process or not. If the CommunicationServer port is already used by a running MI process, running another process using the same port number will cause a port binding exception and causes the failure of creating the CommunicationServer thread; however, this will not hinder the startup of that MI process. In this case, any services invoked by the framework against the CommunicationServer will fail; thus making this port number unique per MI process becomes necessary. h4. Configuring CommunicationServer Port number The CommunicationServer port number for all your MI installations that needs to run concurrently must be assigned a unique port number. By default, port number 45000 is used. To override this value, add a parameter MobileEngine.CommunicationServer.Port into the MobileEngine.config file, specifying the unique port number. For example if you have 3 MI client installations, you can set them as follows: > Installation 1: MobileEngine.CommunicationServer.Port=50001 Installation 2: MobileEngine.CommunicationServer.Port=50002 Installation 3: MobileEngine.CommunicationServer.Port=50003 If you are confident that your MI does not use any services from the CommunicationServer, you may leave the settings at ease, but if not, then give your installation a unique port number. h4. Configuring Tomcat runtime services port numbers > > Installation 1: HttpConnection port = 4444, Ajp12Connection port = 9007 ( default settings ) Installation 2: HttpConnection port = 4445, Ajp12Connection port = 9008 Installation 3: HttpConnection port = 4446, Ajp12Connection port = 9009 h4. Modifying the start_me.html for MI Tomcat runtime If you are using the MobileEngine.exe to startup your MI client, you have to modify the +start_me.html+ file which is located inside the root folder of your MI installation directory. Below is the html content of the said file. Here, you have to modify the URL to reflect the changes in the port number which you assigned to that certain installation. In the listing below, you have to change the port number 4444 to the port number of the HttpConnectionHandler you assigned to that installation as described in the previous section.

> h3. Executing MI installations concurrently Now that the MI installations are configured properly, we can now start them up to set their individual settings like the hostname and middleware to which each installation shall be synchronizing with. You can invoke either MobileEngine.exe or the startup.bat file which is located in the root directory of your MI installation. When using MobileEngine.exe, MI browser will also startup calling the start_me.html file and it does not have an address text box for you to change your URL. When using the startup.bat, you have to manually run a browser and set its URL specifying the port number used for every installation. Figure 2 shows a screenshot of five MI clients (2 AWT and 3 Tomcat runtimes) running concurrently . For Tomcat runtimes, as you can see in URL on the Address box, I specified a port number assigned to an installation on the different instances of my Firefox browser. Now, you can work on every MI client and applications without having the need to shutdown the previous instance of other MI installations. image

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply