Two-Level Section Names
JADE supports a two-level hierarchy of section names within the JADE initialization file. To achieve this, you can prefix a section name with a unique identifier that is supported when a JADE program detects the optional name=unique‑identifier command line argument.
For example, you can define two qualified [JadeAppServer] JADE initialization file sections called [SecureAS.JadeAppServer] and [InternalAS.JadeAppServer], with the RPCEncryptionEnabled parameter in the [InternalAS.JadeAppServer] section set to false and the same parameter in the [SecureAS.JadeAppServer] section set to true. You could then have one JADE application server executable (jadapp) shortcut with name=SecureAS in the command line and another shortcut with name=InternalAS in the command line.
The unique-identifier value is case-sensitive, cannot include a dot character (.), and is limited to 100 characters.
If the name argument is present in the command line of the JADE program, the qualified section name (for example, [SecureAS.JadeAppServer]) of the JADE initialization file is checked first, followed by the single‑level section name (for example, [JadeAppServer]). If the name argument is not specified on the command line of the JADE program, any JADE initialization file sections that contain a two‑level section name are ignored. See also "
To enable JADE methods to access initialization files, the following must apply.
-
The JADE initialization file jade-initialization-file value must be case-identical to the argument value obtained from the command line (that is, ini=jade-initialization-file or its default location).
-
The first character of the section name must not be a dot (.) character.
If these conditions are not met, the code proceeds as if the name argument is not present on the command line.
Excluding the dot character (.) used to separate the unique-identifier value and the standard JADE initialization file section name, JADE assumes that the section name does not include a dot character.
If a dot character other than the two‑level separator is detected, it is treated as a single entity. For example, the section name [joe.bloggs] could lead to confusion between accessing a [bloggs] section when the shortcut command line contains the name=joe argument and accessing the section [joe.bloggs] when there is no name argument specified in the command line. If name=joe is defined and the [joe.bloggs] JADE initialization file section is being accessed, the two‑level behavior first checks for a [joe.joe.bloggs] section and then for a [joe.bloggs] section if the [joe.joe.bloggs] section is not present.
For more examples of JADE’s handling of the unique section name identifier, see the example under "Supporting Application Class Method Calls and Global Constants", later in this chapter.
When a JADE program whose command line contains the name=unique-identifier argument updates the JADE initialization file, the qualified section is changed. If there is no qualified two‑level JADE initialization file section, the appropriate qualified section is created. If a value is not present in either the qualified or the unqualified section, the value is created in the unqualified section.
You can apply a qualified unique identifier to the optional [JadeCommandLine] section of the JADE initialization file (for example, [SecureAS.JadeCommandLine]). For details, see "JADE Command Line Section [JadeCommandLine]", later in this chapter.
You cannot define command line arguments for the jdbutilb batch JADE Database utility program in a [JadeCommandLine] section because the format of the command line differs from that of other JADE programs. However, the use of the name argument is supported on the jdbutilb command line and normal rules apply when the batch JADE Database utility program accesses JADE initialization file values.
For details about placing JADE initialization file parameters on the command line, see "
The following example shows a sample portion of a JADE initialization file, which assumes that name=Example is specified on the JADE application server executable (jadapp) shortcut command line.
[JadeAppServer] KeepAliveTime=10 ConnectionTimeout=0 EnableAppRestrictions=false AllowSchemaAndApp1=<schema, application> WindowPos=0,0,500,100 AutomaticDownLoad=true CacheEntryTimeout=30 PictureCacheFile=<default> RPCEncryptionEnabled=false RPCEncryptionHookDLL=Internal [Example.JadeAppServer] NodeName=jadapp-6006 NodeNameDescription=JADE AppServer 6006 (\system) WindowPos=1,49,924,136
Original values that are not updated (for example, AllowSchemaAndApp1) stay in the original [JadeAppServer] section. Values that are updated (for example, WindowPos) are put into the new [Example.JadeAppServer] section.