
Running an Instance of Notification Services
To run the engine that runs hosted event providers, generators, and distributors on the local computer, you must do the following:
-
You must install the Notification Services engine components on each server that runs a hosted event provider, generator, or distributor.
-
You must register the instance on each of these servers. When registering the instance, you do not need to create the Windows service. Your hosted engine can take the place of the Windows service.
-
You must install your application on each of these servers.
-
You must call your code that instantiates and starts the instance on each of these servers.
If you install the Windows service, note that you cannot start the Windows service and then start the instance in your application at the same time. Only one thread of one process can "own" the instance at any one time.
If you start the NS$instanceName Windows service, and then attempt to start the instance in your application, Notification Services will throw an exception and your application will not start the instance. The reverse is also true: If your application is running the instance, and then you attempt to start the Windows service, the Windows service will fail to start.
If the thread that owns the instance's engine on that server fails, other threads within that process can take ownership of the instance.
Note: |
|---|
|
If you host the engine, standard tools used to start and stop the instance, such as SQL Server Management Studio, net commands, and Services in Control Panel, cannot be used to start and stop the instance.
|