Two-Level Section Names
The Jade Platform 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.