+ Reply to Thread
Results 1 to 1 of 1

Thread: Recommended way of handling "BIG" SI failure

  1. #1
    Young's Avatar
    Young is offline Junior Member
    Join Date
    March 5th, 2008
    Location
    Toronto, Canada
    Posts
    58
    Blog Entries
    1
    Downloads
    7
    Uploads
    0

    Post Recommended way of handling "BIG" SI failure

    General approach to handle the service failure is to throw SoamFatalException; specifically for C++ API, it is best to allocate the exception dynamically, assigned to smart pointer, fill error message and finally throw the pointer.
    The Fatal exception has default error handling associated to it based on place it was throw (e.g. onSessionEnter(), onInvoke(), etc.)
    (For more detail about error handling, please refer to Service error handling control section in Application Development Guide.)

    If the service needs different actions be taken based on some internal conditions, then ControlCode can be set through setControlCode() prior to the Fatal exception throwing. And the corresponding actions will need to
    be configured in Application profile’s Service Control section.

    However, if you're not sure about the binary integrity any more, e.g., memory curruption, and you think calling any other function in the catch(...) block of your service code will worsen the situation, e.g. putting the binary in a zombie state or making it crash, the safest way is to exit() the service, or abort() in case you're interested in debugging your service with core dump. SIM will immediately detect the event, e.g. onExit, and restartService action will be taken on the SI (actionOnSI="restartService" in the Serivce-Control section of your application profile), rather than keeping the SI alive (actionOnSI="keepAlive").
    Last edited by Young; March 17th, 2008 at 06:12 PM.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts