Matrix System Defaults Program

Related Topics
The Initialization File in Windows
The Initialization File in Unix
Setting Personal Preferences

MatrixSystemDefaults program is designed to allow administrators to centrally control MX_ settings in a manner that cannot be overridden by local environment/ini-file settings. This program is read as soon as a database connection is obtained, and used to initialize the MX_ variables it contains. If this program exists, any variables not set in it or not allowed to be overridden use their default values. If no MatrixSystemDefaults program exists, the system functions as described above. The diagram below describes the logic used for setting variables.

Similar to the MatrixIniDefaults program, the format of the code section of the program object named MatrixSystemDefaults must be identical to an ini file with one NAME=VALUE per line. Comments can be indicated with '#'. However, the MatrixSystemDefaults program can include any number of local sections so that servers or groups of users can be pointed at specific configurations for each of them, by including the name of the local section they need in their environment. The system defaults program can also include a list of variables that are allowed to be overridden locally, using a variable called MX_SYSTEM_OVERRIDE_ALLOWED. The sections that follow describe these novelties of the MatrixSystemDefaults program.

Global and Local Sections

You can include section markers in square brackets to split the file into global settings, which will apply to all users connecting to the database, and any number of local sections. A section marked in brackets by something other than "Global" is considered to define a set of local settings whose name is the set of characters in the brackets. Users connecting with the variable MATRIX_LOCAL_SETTINGS set (in the operating system environment or the ini file) to text included in square brackets in the MatrixSystemDefaults program, will use the settings in that section. If a setting is in both the [Global] and [Local] sections, the value in the Local section will override the value in the Global section.

It is not necessary to explicitly label a section as Global, but the Global section must always be first. If the MatrixSystemDefaults program starts with lines of the form NAME=VALUE that precede any section heading, they will be considered to constitute the global settings. This section will terminate with the first section heading. If there is more than one section with the same name, all but the first is ignored.

Overriding Settings

All variables with names beginning with "MX_" can be set somewhere other than in the MatrixSystemDefaults program only if they are explicitly allowed by the MX_SYSTEM_OVERRIDE_ALLOWED variable. This variable, which can only be set in the global or activated local section of the MatrixSystemDefaults program, should be set to a comma-delimited list of MX_ variable names. In this list, you can use the "*" wildcard to match any number of characters. Other than variables that must be read before the database can be started, if there is a MatrixSystemDefaults program, only those MX_ variables matching those in this list can be set in any way other than through this program. If the MatrixSystemDefaults program exists, any variables not set in it, or not allowed to be overridden use their default values.

Note:

In a Live Collaboration server environment, be sure to include MX_CLASSPATH in the list of variables in MX_SYSTEM_OVERRIDE_ALLOWED in MatrixSystemDefaults program object.

MX_SYSTEM_OVERRIDE_ALLOWED is only valid when set in the MatrixSystemDefaults program. If set elsewhere, it is ignored.

Note that in a typical developer environment, when work is done against a development or test version of the database, you may want to remove the MatrixSystemDefaults program to allow the developers significant local control.

Initialization Settings

The following MX_ settings are read before the database is initialized and therefore cannot be set in MatrixSystemDefaults:

MX_CHARSET
MX_MAX_THREAD
MX_MEMORY_KEEP_LIMIT
MX_MEMORY_SYSTEM_LIMIT
MX_MEMORY_TRACE
MX_SESSION_SILENT_TIMEOUT
MX_SESSION_TIMEOUT

In addition, MX_CONNECTION_POOL_SIZE must be read to create initial connections, but could be overridden in MatrixSystemDefaults for subsequent connections.

Sample Program

The following is a commented version of a sample MatrixSystemDefaults program object:

[Global]
#
# This lists the variables that may be overridden by OS 
environment or ini file settings
MX_SYSTEM_OVERRIDE_ALLOWED= 
MX_CLASSPATH,*TRACE*,MX_EDITOR*,MX_TCL*
#
# These settings will be enforced for all users
MX_RESTORE_CONTEXT=FALSE
MX_RESTORE_TRIGGERS=TRUE
MX_NESTED_TRIGGER_MACROS=TRUE
MX_CONNECTION_POOL_SIZE=10
#
# These settings will be enforced for users who connect to an
# executable that was started with the variable 
# MATRIX_LOCAL_SETTINGS=Paris (set in environment or ini file)
[Paris]
MX_LDAP_HOST=mxs1am
MX_LDAP_AUTHENTICATOR=xxx
MX_LDAP_BIND_DN=xxx
MX_LDAP_BIND_PASSWORD=xxx
...
# These settings will be enforced for users who connect to an
# executable that was started with the variable 
# MATRIX_LOCAL_SETTINGS=Boston (set in environment or ini file)
 [Boston]
MX_LDAP_HOST=mxmlsun1
MX_LDAP_AUTHENTICATOR=xxx
MX_LDAP_BIND_DN=xxx
MX_LDAP_BIND_PASSWORD=xxx
...

Protecting Against Locking All Users out

It is possible for a situation to develop in which no user can log in. For example, consider the case in which an LDAP server is in use and the MatrixSystemDefaults program is set up in such a way that users are not permitted to override the LDAP settings in their own ini file or environment. In this case, the LDAP settings will be in the MatrixSystemDefaults file, either in the global or a local section. Now consider what might happen if the LDAP settings need to be modified, say, because the server is now on another machine. If the settings have not been changed in the MatrixSystemDefaults program, LDAP will not work, and no further logins will be possible, including for System Administrators.

To protect against such problems, we recommend that you have a local settings section for use by system administrators that allows any MX_ variables to be set. Do not let anyone other than system administrators know the name of this section. Also, remember that if a program is set to hidden, the MQL command print program will not print out the code of the program to anyone except business administrators who have program administrative access.

If for some reason you get stuck and even administrators cannot login to fix the system, as a last resort, you can change the name of the program in the database using a database tool such as sqlplus to modify the database. The sql needed to accomplish this task is:

update mxProgram set mxName='MatrixSystemDefaults-bak' where 
mxName='MatrixSystemDefaults';

Once the MatrixSystemDefaults program no longer exists, all users can set any MX_* variables in their ini file or environment. An administrator can then login and fix the MatrixSystemDefaults-bak program and rename it back to its original name so that it controls the appropriate settings.