SDAC

TMSChangeNotification.Service Property

Used to assign a service manually.

Class

TMSChangeNotification

Syntax

property Service: string;

Remarks

If this property is not assigned, TMSChangeNotification automatically creates a service and associates it with a queue in order to receive change notifications from this queue. The name of the automatically created service consists of the 'SDAC_NS_' prefix and the current session identifier (SPID). The queue name consists of the service name and the '_QUEUE' postfix. Such service and queue are created for each connection.

If several DataSet components work through the same connection associated with the TMSChangeNotification component, only one service and one queue will be used. After all DataSets of a connection are closed, and notifications are not necessary, the service and the queue are dropped. Also if there are invalid services and queues at the server, they will be dropped. A server or a queue is considered invalid if there is no connection with the corresponding SPID. This should be done in order to prevent clogging the server with unused services and queues, and to remove all unused notifications.

If a service name is assigned via this property, it is necessary for you to create the service manually. The service should be created according to the rules of such object creation for Query Notification. Manually assigned service will not be deleted by SDAC after all datasets using it are closed. It means that the notification subscription will stay active, and when the query is opened next time, it will be able to receive notifications.

You should remember that several applications, or several instances of the same application using the same service name, may work incorrectly, as they will obtain notifications from the same queue. To avoid possible problems, it is necessary to use a separate service for each connection (if Service is not assigned, this is done automatically).

© 1997-2019 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback