Submitting Processes and Licensing on Startup
Redwood Platform supports executing a autoexec files at the time of startup of the application server. The autoexec file can be either a CAR file (to be imported/executed) or a license file; in this case the license is installed automatically. The CAR file can contain a specially crafted XML file that submits a process.
You license a system automatically by copying the license text into a autoexec.license
file located in <install_dir>/j2ee/cluster/global/conf
.
Likewise, the autoexec.car
is located in <install_dir>/j2ee/cluster/global/conf
.
The CAR file is only executed once at startup, a checksum for the autoexec.car
file is generated, if it matches the checksum saved in the Redwood Server registry, the CAR file will not be executed, if it does not match, the checksum registry entry is updated with the new checksum.
You can use any CAR file, all objects in the CAR file will be imported. To submit a process from the CAR file, create a directory named Submit at the root of the CAR file and place an XML file into that directory. The name of the XML must match the following syntax: <partition>.<definition>
, where <definition>
is the name of a process definition or chain definition; furthermore, the contents of the XML must at the very least contain the following:
<Submit JobDefinition="<partition>.<job_definition>" />
You can specify process notes, process parameters.
Registry Keys
/configuration/boot/car/checksum
- checksum of theautoexec.car
file/configuration/boot/car/error
- if this registry entry is set toabort
, any error that occurs when you import the CAR file will cause the startup of the application server to abort./configuration/boot/car/location
- location of theautoexec.car
file,<install_dir>/j2ee/cluster/global/conf
by default.
Example
Example creating a car file from the command line:
$ cd /tmp
$ mkdir car
$ cd car
$ mkdir Submit
$ echo '<Submit JobDefinition="GLOBAL.System_Sleep.xml">
<JobNote String="Automatically submitted on startup" />
</Submit>' > Submit/GLOBAL.System_Sleep.xml
$ jar -cf $RW_INSTALL/j2ee/cluster/global/conf/autoexe.car *
$ $RW_INSTALL/j2ee/cluster/server1/bin/restart.sh
$
The contents of the XML file in the CAR file:
<Submit JobDefinition="GLOBAL.System_Sleep.xml">
<JobNote String="Automatically submitted on startup" />
</Submit>
See Also
onsiteTopic