Configuration
The configuration is split into a number of sections and is stored in different files. There are settings for the Mobile Engine, the Web Adapter and the application itself. The configuration files are XML files which means that the XML syntax must be adhered to when editing the files.
Configuration files for the Web layer
Configuration files for the Application layer
Note: With a multiserver installation, you must always ensure that the Master service is the first service to be started when starting the Mobile Engine services. After startup, each slave registers itself with its master. If the master is restarted after the slave, the slaves are no longer registered and load distribution can no longer be performed.
Session Timeout Administration and Behaviour
Session Timeout
CSP Mobile automatically terminates sessions if the app connected to a session is closed without the user having first explicitly logged out. Such sessions are referred to as "unused sessions" or "abandoned sessions", and the timeout mechanism is referred to as the "session timeout". This timeout mechanism is controlled via the "sessiontimeout"- key in web.xml. The value is given in minutes and the default value is "20". The value can be decreased to a minimum of one minute ("1") in order to have unused sessions terminated as quickly as possible.
Please note that decreasing the value may increase the risk of inadvertent session terminations in case of short term network outages or performance problems (concerning the route between the client computer and the web server) or in case the client computer does not deliver sufficient computing power to complete client side in- browser operations in time.
Inactivity Timeout
The "user inactivity timeout", which is responsible for termination of sessions which have not been abandoned, but did not receive any user input for a given time, is now controlled via the "sessiontimeout" key in mobileenabler.cfg. This value is also given in minutes and the default value is "20". Please note that this value must not be lower than the session timeout in the web.xml file.
Using HTTPS
Communication between the app and the server can be handled over HTTPS, i.e. it can be encrypted.
The description below gives an example of how to set up SSL for Tomcat 7.0.
Requirements
Tomcat 7.0 installation, JRE installation
Creating a Self-Signed Certificate
- Choose Start > Run to display the command prompt: cmd.exe.
- Change to the Java folder. XXX stands for the version number:
cd C:\Program Files\Java\jreXXX\bin.
- Enter the following command:
keytool -genkey -keyalg RSA -alias tomcat - keystore keystore.jks -validity 2048 -keysize 2048
- A password is requested. Enter the KeyStore password and confirm your entry with <Enter>. If you do not enter a password, the default password "changeit" is used.
- Enter the name of the computer for First and Last Name (e.g. "SRV050" or "mobile.company.de").
- Enter Organizational unit, Organization, City, and State.
- Enter as two letters: DE.
- If all the data is correct, respond to the subsequent query with Yes.
- Enter the key password and confirm your entry with <Enter>.
Tomcat Configuration
- Change to the folder
C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf. - Open the file server.xml.
- Search for Define a SSL and comment out the connector definition under it.
- Enter the new connector as follows (XXX stands for the version number):
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="C:\Program Files\Java\jreXXX\bin\keystore.jks" keystorePass="changeit" keyAlias="tomcat"/>
Note: In the keystorePass parameter you enter the previously entered KeyStore password (see the section Creating a self-signed certificate).
Restarting the Service
Restart Apache (service).
web.xml
The web.xml file is a default file in a JSP application. This file stores the settings for the Web server/Web application and the virtual folder.
The file is located in CubewareBI.war and can be modified using the Web server.
Syntax example
<web-app id="mobileenabler">
<display-name> CSP Mobile </display-name>
...
<context-param>
<param-name>application</param-name>
<param-value>mobile<param-value>
</context-param>
...
<!-- further entries -->
</web-app>
The following entries are relevant for the configuration:
Name |
Default Value |
Meaning |
|---|---|---|
application |
mobile |
Specifies the application type for the server. Should not be changed. |
config |
mobileenabler.cfg |
Specifies the configuration file that is used by the Web application. |
server |
localhost |
Specifies the machine on which the Mobile Engine is running (application layer). The Web Adapter always connects to this machine. |
port |
4444 |
Specifies the port at which the Mobile Engine is accessible. |
timeout |
1200 |
Specifies the timeout in seconds for communication with the Mobile Engine. This value should not be too low, since heavy utilization of the Mobile Engine will lead to increased response times. |
sessiontimeout |
20 |
Session timeout. Specifies the timeout in minutes after which a client is terminated automatically. This value is passed to the Web server. In other words, the Web server's session management function is responsible for terminating the client. For further information refer to Session Timeout Administration and Behaviour. |
mobileprotocolversion |
22 |
This is used to force a minimum version of the app. The value should not be changed. |
mobileminimumappversion |
1.2 |
Name of the minimum version of the app (for information). The value should not be changed. |
teamserver |
localhost |
CSP Server used. A CSP Server can also be set in the external settings of the mobile device. If no CSP Server is set in the mobile device, the specification made here is used. |
whitelist |
* |
List of the repositories that can be used on mobile devices. The names of the repositories must be entered separated by semicolons. Example: Pantara AS;Pantara Mobile;Pantara Demo Only the repositories "Pantara AS", "Pantara Mobile" and "Pantara Demo" can be selected on a mobile device. No other repositories can be selected. * or empty means that all repositories can be selected. |
Mobile Engine - mobileenabler.cfg
The Mobile Engine is configured in mobileenabler.cfg in the section <webruntime>.
In a standard installation, this file is located in the folder C:\ProgramData\Cubeware\CSP Mobile.
Syntax examples
<config>
<webruntime type="master"
maxworker="5"
workerswitch="5"
recycle="20"
port="4444"
portbase="4445"
watchdog="60"
sessiontimeout="20"
logging="normal"
reservationtimeout="10"
assignment="load"
expiretime="60"
</webruntime>
...
...
</config>
A Webruntime of the type "slave" always needs a <master> entry in order to identify the master:
<config>
<webruntime type="slave"
....
....>
<master ip="compname"
port="4444"/>
</webruntime>
...
...
</config>
The following entries are relevant for the configuration:
Name |
Default Value |
Meaning |
|---|---|---|
maxworker |
25 |
Specifies the maximum number of Worker processes that can be started on the machine. |
workerswitch |
3 |
Specifies how many clients a Worker process is able to serve concurrently. If this number is reached, a new Worker process is started. This specification is used for internal calculations regarding the utilization of the machine. This value is very important as a Worker process is only permitted to use a maximum of 2 GB of memory. If a high value is selected for The setting should be selected in such a way that the normal memory requirements of a client multiplied by The product of |
recycle |
10 |
Specifies the number of served clients before the Worker process is restarted. When a Worker process reaches |
port |
444 |
Specifies the port at which the clients communicate with the Mobile Engine. The port can be freely selected, but should be greater than 5000. Caution: If you change the |
portbase |
4445 |
Specifies the port number as of which ports are assigned for the Worker processes. One port number each is assigned to the Mobile Worker process and the Chart Worker process, starting at
Caution: If you change the |
watchdog |
20 |
Specifies the interval for internal monitoring of the Worker processes. This specification is made in seconds. |
sessiontimeout |
20 |
User inactivity timeout. Specifies the "idle time" after which a client is terminated automatically. This specification is made in minutes. Caution: This specification may collide with the session timeout in the Web server (web.xml). Refer also to the notes in the section Session Timeout Administration and Behaviour. |
logging |
maximum |
Specifies how many entries are created in the Event Viewer. The following values are permitted:
|
reservationtimeout |
10 |
Specifies the time in seconds that the system will wait until a client has logged into the Web Worker process (specified in seconds). |
assignment |
load |
Specifies the assignment strategy. The following values are permitted:
|
master/ip and master/port |
|
Specifies the master for a Webruntime which is defined as type "slave". You must specify the IP address (or the NetBIOS name or the FQDN (Full Qualified DNS Name)) and the port. |