CTBCAFServiceAlmMgmt

From TBwiki
Revision as of 09:14, 30 May 2011 by Abrassard (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The class CTBCAFServiceAlmMgmt is used by an application that wants to be launched automatically by the Toolpack system.

An application that initializes this class has to provide a callback to interface ITBCAFServiceAlmMgmtClient. This interface provides 3 functions that the application must implement:

  • OnMgmtReady: Tells the application that it's properly being detected by Toolpack OAM.
  • OnMgmtShutdown: Tells the application that it must shutdown itself. If the application takes too long (default timeout 20 seconds) it will get killed by Toolpack OAM.
  • OnMgmtHeartBeat: This function is called periodically by Toolpack OAM to test that the application is still alive. The application, within this function, should perform a sanity check on it's various internal modules. If this function call does not return, Toolpack OAM will kill the application after a timeout (default 20 seconds).


Adding an application to the Toolpack Web Portal list of applications

Once an application has create an object of class CTBCAFServiceAlmMgmt, and properly implemented the interface ITBCAFServiceAlmMgmtClient, it's ready to be automatically launched and shutdown by Toolpack OAM. The list of applications that are launched by Toolpack OAM is found in the Toolpack Web Portal, under sections:

  • Applications -> Configurations
  • Applications -> Instances

Steps to add an new applications are:

  • Create a new Application Configuration
* Go to Applications -> Configurations
* Click "Create New Application Config"
* Fill appropriate information
  * Name of this application's configuration
  * Path of the binary file to launch (some variables can be used here for convenience)
  * Working directory
  * Command-line arguments
  • Create a new Application Instance
* Go to Applications -> Instances
* Click "Create New Application Instance"
* Fill appropriate information
  * Name for this application instance
  * Host the application should be running on
  * Configuration just created above
  * Target state (run, don't run)
  • Apply the modified configuration


Example usage

Personal tools