project BLF > class ApplicationControl

technical class
inherited from Technical Component

Description

This technical component should only be used by an external script to perform administrative tasks on an installed system. It is not intended to be called from any other business component. The external script would typically use the program/applicationcontrol.p as a starting point.

Typical use would be:
_progres -p applicationcontrol.p -param "<options>" -b > <LogFile>


Where <options> is a string that can be used to pass options to the applicationcontrol, and is of
the format "-<option> [<value] [-<option> [<value]]".
Where options can be:

* URL
is the connection string for the central application appserver. Typically this is formatted as follows:*/
"appserver://<HostName>:<NameServerPort>/<AppServiceName>". If the URL is not specified, the
logic is executed on the _progres session itself, rather than running the logic on the official appserver
machine.
* PROPATH
is the propath that should be used by the _progres session in case the logic is run in the process
itself rather than on the central appserver. (this is when <URL> is blank).
* ACTION
indicates what needs to be done. The <value> can be one of the following:
o StartApplication
This performs a sequence of steps that is required when the application starts up. This should be
executed right after the appserver has started. Following steps are done:
1. Run house keeping, which deletes the data of all inactive instances from the database.
2. For each daemon that needs to be started automatically, it tries to start the daemon.
o StartApplication_no_housekeeping
The same as "Start", but without the house keeping step.
o StopApplication
This performs a sequence of steps that is required when the application needs to be stopped. This
should be executed right before the appserver (and database server) go down.
In the current implementation, the only step that is done is stopping all running daemons.
o StopApplication_no_wait
This is the same as "Stop", but the system will not wait for max. 5 minutes to come back and wait
for the different processes to really stop gracefully.
o OnlineHousekeeping
This will run (partial) housekeeping while users are still active in the application.
o StartDaemon [<DaemonName>]
This tries to start a new instance of the named daemon.
If the DaemonName is not specified, it tries to start all daemons that are configured to run.
o StopDaemon <DaemonName>
This tries to stop all instances of the named daemon (sending a stop request).
o UnconditionalStopDaemon <DaemonName>
This tries to stop all instances of the named daemon unconditionally (kill if necessary)
o DaemonStatus [<DaemonName>]
This returns the status information about the named daemon.
If the DaemonName is not specified, it returns the status information of all defined daemons in the*/
system.
The following information is shown for the daemon(s):
Daemon Name: XmlDaemon
[Status] Status: Active
[Status] #Running instances: 2
[Status] Proces Ids: 1884, 4856
[Status] Start date of daemon: 04/12/2007
[Config] Log file: /users/xyz/logs/xmldaemon.log
[Config] Startup folder: /users/xyz/daemons/xmldaemon
[Config] Daemon login: mfg
[Config] XML input folder: /users/xyz/daemons/xmldaemon/input
o ResetDaemonConfiguration [<DaemonName>]
This needs to be executed when a system is copied (copy an application database from one
environment to another). It makes sure the configuration information of the daemons is reset to the*/
initial values (ApiSynchronise), so that the daemons cannot be accidentally be started, using
configurations of the system where it was copied from.
By default, this resets all daemons, but by specifying a Daemon name as extra parameter, it can be
limited to one daemon only.
o Synchronize [Full|Limited|Topic<XX>]
This performs a synchronize in a certain mode:
1. Full
2. Limited
3. Topic<XX>
The error/warning messages and other information is put on the std out. So, by redirecting the
output of the _progres command, the script can interpret the result of the ApplicationControl run.


methods