4. Designing and Writing OpenROAD Server Applications : OpenROAD Application Requirements : Ghost Frame : OpenROAD Server StartGhost: Sample Script
 
Share this page                  
OpenROAD Server StartGhost: Sample Script
The application starting component of an OpenROAD Server application must be a ghost frame. The initialize section of the starting ghost frame is executed once when the image is loaded and prepared by an ASO. There should be no other events in the starting ghost frame; there is no continually running thread within an ASO.
ASOLib must be initialized in your starting ghost frame. This sample script shows how to initialize ASOLib. You can cut and paste it into your application's start ghost frame script.
/*----------------------------------------------------------------------------*/
/*                                                                            */
/* Frame           : ASO Start Ghost frame                                    */
/*                                                                            */
/* Frame Name      : aso_start_ghost_template                                 */
/*                                                                            */
/* System Name     : ASOLib                                                   */
/*                                                                            */
/* Sub-System Name : n/a                                                      */
/*                                                                            */
/* Author          : Ingres Corporation                                       */
/*                                                                            */
/* Date            : dd/mm/yy                                                 */
/*                                                                            */
/* Description     : Example Ghost frame start component for an OR application */
/*                   running under the OpenROAD Server and using ASOLib.      */
/*                                                                            */
/* An application that is to run under the OpenROAD Server MUST have a       */
/* ghost frame defined as its start component.  In addition, an application   */
/* that uses ASOLib must call ASOLibInit from within the GhostFrame start     */
/* component to initialize ASOLib's internal structures.                      */
/*                                                                            */
/* This is an example of such a component.  You can copy it and make it the   */
/* start component of your OpenROAD Server application.                       */
/*                                                                            */
/*                                                                            */
/* Version History                                                            */
/*                                                                            */
/* Version Date     Who   Description                                         */
/* ------- -------- ----- -----------                                         */
/* 1.0     dd/mm/yy ???   Original version.                                   */
/*                                                                            */
/*----------------------------------------------------------------------------*/

INITIALIZE
 (
)=
DECLARE
/*----------------------------------------------------------------------------*/
/* Variables local to this frame and its local procedures                     */
/*----------------------------------------------------------------------------*/

/* none */
/*----------------------------------------------------------------------------*/
/* Procedures local to this frame                                             */
/*----------------------------------------------------------------------------*/

/* none */

ENDDECLARE
/*----------------------------------------------------------------------------*/
/* EVENT: Initialize                                                          */
/*----------------------------------------------------------------------------*/
/* Set an exit trap and initialize the ASO txn control objects                */
/*----------------------------------------------------------------------------*/
BEGIN
    IF CurFrame.SetExitTrap() = 1
    THEN
        CurFrame.Trace ('AppServer application exited abnormally at startup.'
                       +'OSCA.v_msg_txt = ' + OSCA.v_msg_txt
                       +' This message issued from aso_start_ghost ExitTrap');
        RETURN;
    ENDIF;
                                        /*------------------------------------*/
                                        /* Call the ASOLib initialization     */
                                        /* procedure (mandatory if ASOLib is  */
                                        /* being used in an OR Server         */
                                        /* application)                       */
                                        /*------------------------------------*/
 CALLPROC ASOLibInit();
                                        /*------------------------------------*/
                                        /* Call your app-specific             */
                                        /* initialization procedures.         */
                                        /*------------------------------------*/
        /* <<< CALLPROC MyInitProc1();  */
        /* <<< CALLPROC MyInitProc2(); */

END

/*----------------------------------------------------------------------------*/
/* -------------------------- End of Frame Script --------------------------- */
/*----------------------------------------------------------------------------*/