There are many reasons why you might want to insert code
that modifies the behavior of applications at the level of the queue
manager. Each of your applications has a specific job to do, and its
code should do that task as efficiently as possible. At a higher level,
you might want to apply standards or business processes to a particular queue
manager for all the applications that use that queue
manager. It is more efficient to do this above the level of individual
applications, and thus without having to change the code of each application
affected.
Here are a few suggestions of areas in which API exits might be
useful:
- For security, you can provide authentication, checking that
applications are authorized to access a queue or queue manager. You can
also police applications' use of the API, authenticating the individual
API calls, or even the parameters they use.
- For flexibility, you can respond to rapid changes in your
business environment without changing the applications that rely on the data
in that environment. You could, for example, have API exits that
respond to changes in interest rates, currency exchange rates, or the price of
components in a manufacturing environment.
- For monitoring use of a queue or queue manager, you can trace
the flow of applications and messages, log errors in the API calls, set up
audit trails for accounting purposes, or collect usage statistics for planning
purposes.