Programming Exit Components for iWay Service Manager

iWay Service Manager must be able to run on any platform. Normally, this is a simple Java concern. However, some platforms such as IBM Open Edition under MVS, run in a different code page (1049) than the standard ASCII code page. If an exit or business agent must read or write a byte stream, it must also use the appropriate encoding version of the methods used. This issue applies to all exits and business agents, but is especially true in encryption exits, which must deal with raw bytes unassociated with code pages.

An instance of the exit is created as needed, and cached. A new instance is not created unless there is no available instance in the cache. You cannot predict which instance will be assigned to your channel at any time. Therefore, your exit must be serially reusable. Special register facilities exist for passing information between executions, but these facilities should be avoided if possible.

The Init() and term() methods in all exits run synchronized. However, the execute() and transform() methods can run in multiple threads. They must be reentrant as a general rule. Any global data can be initialized only in the init() routine, and unless your code locks the variables, it cannot be changed in the execute() or transform() routines at the risk of memory read failures. Such failures can be difficult to debug, but are usually evidenced by the reentrant method receiving unexpected data from the global area as other threads change the values. Do not depend upon the init() routine being called only once. The engine may elect to roll out your exit during periods of peak use and reinstate it later.

For more information on the standards that apply when coding any iWay Service Manager exit, see Programming Standards, General Rules of the Road.


iWay Software