Browse Prior Art Database

Exception Management Algorithm for Multi-Threaded Method Invocation

IP.com Disclosure Number: IPCOM000113073D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 56K

Publishing Venue

IBM

Related People

Banda, VP: AUTHOR [+2]

Abstract

Object oriented applications using IBM's System Object Model* (SOM) often use a notification architecture that consists of overriding object methods that get invoked at appropriate times to notify the object that an event has occurred. Such a mechanism can be used within a framework which other applications can be built from. In this instance, the framework will invoke the method which is overridden by the application.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Exception Management Algorithm for Multi-Threaded Method Invocation

      Object oriented applications using IBM's System Object Model*
(SOM) often use a notification architecture that consists of
overriding object methods that get invoked at appropriate times to
notify the object that an event has occurred.  Such a mechanism can
be used within a framework which other applications can be built
from.  In this instance, the framework will invoke the method which
is overridden by the application.

      Due to varying circumstances, when the framework invokes the
overriden method an execption may occur.  This execption will bring
down the framework as well as the application whose code was in
error.  A protection mechanism should be implemented to keep the
framework from going down when this occurs so that other applications
that may also be using the framework are not affected.

      The solution to this problem is to provide exception condition
protection before invoking methods that can be overridden.  Since a
framework can exist for multiple applications the algorithm must work
across multiple-threads when running under OS/2*.

      The algorithm for this protection, whose code is shown below,
is to use the signal, setjmp, and longjmp C library routines with a
thread specific link list of nested exception data handlers.  Before
the notification method is invoked the exception handler is
registered and the setjmp function is called to preserve the stack
state in the event of an exception.  This informatio...