Sessions & Connections > Use Notification
 
Use Notification
The notification is implemented in the ‘Enterprise’ or ‘Workstation’ editions of Oracle.
The following entities are required:
*a queue (either persistent or not),
*a subscriber attached to this queue,
*a trigger for the event.
The trigger will send a message to the queue, and the application will be notified that an event was generated.
This feature lets you receive notifications from the RDBMS asynchronously. This means that the application may be performing any task when the notification is received. A handler is automatically called when the notification is received. When it is completed, the execution will continue the interrupted task.
Subscribe to an Event
Subscription to an event is done using the following function:
IldDbms::subscribeEvent(const char* name,
IldNotifFunction usrCB,
IlAny usrData) ;
The name given will be <queue name>:<agent name>.
*usrCB is the handle that will be called when the event is received.
*usrData is a buffer from the application that will be transmitted to the callback function.
Unsubscribe from an Event
Unsubscribing is done using the following function:
IldDbms::unSubscribeEvent(const char* name) ;
*name is the name that identifies the event (the one used to subscribe to the event).
This function is to be called when you no longer need to receive notifications for a given event.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.