Customizing Java Virtual Machine system properties and files

You can specify Java Virtual Machine system properties and files for saving the QMF for Workstation/WebSphere system properties and files, especially when you configure a cluster to share application settings and other folders among cluster nodes and to set a timeout for a user session.

About this task

By default, all QMF for Workstation/WebSphere system properties and files are stored in the user home directory, the path to which is in the user.home Java Virtual Machine system property. But you can use .instance.area.global, .instance.area.shared, or .instance.area Java Virtual Machine system properties to customize the directories for storing files.

If you want to specify a timeout for a user session to close the session when the user does not work with application, use the .use.session.timeout parameter.

Use the VirtualDataSource.dir parameter for QMF for WebSphere® to avoid possible errors when working with virtual data sources in cluster mode.

You can configure the number of files to be imported by configuring qmf.websecurity.fileupload.restriction parameter for QMF for WebSphere

You can allow loading of QMF for WebSphere or QMF Server inside an iFrame by configuring qmf.websecurity.allow.iframe and qmf.websecurity.allow.iframe.weblink parameters.

The following table describes the available parameters.
Table 1. Java Virtual Machine parameters
Parameter Description Stored files
qmf.instance.area.global This property is responsible for the folder that is distributed among several cluster nodes. It is used to store server configuration files, scheduled tasks, and personal repositories. If this parameter is not set, the settings from the .instance.area are applied.
  • Repository connections data (repositories.xml)
  • JDBC drivers properties (.bi.jdbc.drivers)
  • License files
  • Cache files
qmf.instance.area.shared This property is responsible for the application folder that is shared among several cluster nodes. If this parameter is not set, the settings from the .instance.area are applied.
  • Log files
  • Session data:
    • User settings
    • User global variables
    • Logins and passwords
qmf.instance.area This property is responsible for storing temporary files. If this parameter is not set, the settings from the java.io.tmpdir Java Virtual Machine system property are applied.
Note: In the cluster mode, to ensure the correct work of QMF Server features that require access to the file system, such as scheduled tasks, make sure that every cluster node that has access to this folder has full read and write permissions for the files in this folder.
  • Temporary files
qmf.use.session.timeout This property is responsible for the timeout of a user session. If it is set to true, the user session is closed after the HTTP session timeout that is specified on the server. If this parameter is set to false or not defined, the session is active until the user closes the application. -
VirtualDataSource.dir Specifies the name of a subfolder with a virtual data source cache. For each cluster node, an individual subfolder with respective files and directories, including the cache, is generated. The VirtualDataSource.dir property must specify a unique value for each of the cluster nodes. -
qmf.websecurity.fileupload.restriction Specifies limits for the file import.
  • maximum file imports allowed in time interval: specify values between 1 and 255
  • time interval (in seconds): specify values between 1 and 2147483
  • time (in seconds) when file upload is disabled, after limits: specify values between 1 and 2147483
For example:
-Dqmf.websecurity.fileupload.restriction = 4, 30, 120
5 files can be uploaded in duration of 30 seconds. 6th file can be uploaded after 120 seconds from the upload time of the 5th file.
-Dqmf.websecurity.fileupload.restriction = 4, 30
Error will be written in the log file, unrestricted file uploads are allowed.
Dqmf.websecurity.fileupload.restriction = 4, 30, 2147483
5 files can be uploaded in duration of 30 seconds. 6th file can be uploaded after 2147483 seconds from the upload time of the 5th file
-Dqmf.websecurity.fileupload.restriction=0,30, 2147483
Error will be written in the log file, unrestricted file uploads are allowed.
-
qmf.websecurity.allow.iframe The default value of this parameter is "no". When you change it to "yes", the configuration allows you to load QMF for WebSphere inside iFrame. -
qmf.websecurity.allow.iframe.weblink The default value of this parameter is "no". When you change it to "yes", the configuration allows you to load WebLink inside iFrame. -
wim.commonauthz.runtimedir If an absolute path is specified and the absolute path exists and is a directory, logs would be written to this path.If the above conditions are not satisfied, then this value should be of the format /nodes/<node_name>/servers/<server_name>. A subdirectory under the {qmf.instance.area.shared}/log folder would be created as <node_name>/<server_name> and the logs for this node would be written under this subdirectory.

If this property is not specified, logs would be written under {qmf.instance.area.shared}/log folder itself as before.

It is recommended to keep this value different for every node in the cluster so that each node writes into separate logs, making it easy to debug and isolate any problem to a particular node.

The valid value for this system property can be any relative or absolute file system path.

Log files
org.apache.activemq.default.directory.prefix This is a system property and is used to customize the home directories of activemq data. This is used to change the home directories of activemq-data.  
jgroups.udp.mcast_port If you are using the UDP configuration in JGroups, this port is used for multicast. The default value of the port is 45588  
JGROUPS_TCP_INITIAL_HOSTS If you are using TCP in JGroups, this property defines the initial list of host-port pairs used to contact and join the cluster. The value of this property should be the host and port of the nodes already up and running in the cluster. You need not specify this property for the first node in the cluster. This can also be specified as an environment variable(useful in environments such as OpenShift where you cannot create a Docker image everytime when the container/pod changes its IP address with every restart).

You must define this property as a comma-separated list of host and port in the format: host1[port1],host2[port2]

The default values are: localhost[7800],localhost[7801]

 
JGROUPS.CONFIG.FILE
This property defines the path to the JGroups XML configuration file. If not provided, a file with a default UDP protocol configuration would be created with the following path:
{qmf.instance.area.global}/jgroupsConfig.xml

The default value is: jgroupsConfig.xml

JGroups configuration files
qmf.network.derby.server.port This property defines the port on which the centralized derby for virtual data source should be started. The valid values can be any valid port number which is not already being used.

The default value is : 1528

 
qmf.distributed.mode.forcedisable This property defines whether the application is deployed in multi-node environment. If the value is specified as true the multi-node deployment is disabled (stand alone mode would be enabled). The valid values can be either true or false. The default value is: false  
qmf.cluster.id

This property defines the cluster ID of the cluster. All nodes in a cluster should have the same cluster ID. The property can be used in the following two ways:

  1. You already have a unique ID. The same unique ID needs to be passed while starting every node. The ID should be unique across the entire environment in your infrastructure (for example, if you have a UAT and a PROD environment, it should be unique across both environments). The unique ID should be alphanumeric and should not have special characters.
  2. You do not have a unique ID. While starting the first node, do not pass this, and a unique cluster ID will be generated by QMF and printed in the Output window. This unique ID needs to be passed while starting the other nodes.
 
jgroups.udp.mcast_addr This property is responsible for setting the multicast group address used in UDP. The default value is 228.8.8.8  

To specify particular paths for saving system properties and files:

Procedure

  1. For QMF for Workstation
    1. In the application installation directory, open the eclipse.ini file.
    2. Add the parameters the value of that you want to customize with the -D prefix and specify the path for the new storage. For example, -D.instance.area=C:\work\
    3. Save the eclipse.ini file.
  2. For QMF for WebSphere:
    1. Start the WebSphere Administrative Console by opening a web browser on a client machine, and entering the appropriate URL.
    2. Navigate to the Process definition and, in the Custom properties for Java Virtual Machine, add the required properties .instance.area.global, .instance.area.shared, .instance.area, or .use.session.timeout depending on the parameters that you want to modify.
    3. Save the added parameters.