In Aware Server v3.0 there may be times when you want to ensure that one and only one of a particular service is running in an environment (Dev, QA, etc.).
We needed this functionality for the core layers so we decided to expose it to anyone developing WCF services on top of Aware.
To make your service an Environmental singleton, simply add the following attribute to the top of your service implementation of IMyServiceContract.
[EnvironmentBehavior(EnvironmentInstancing.Singleton, typeof(IMyServiceContract))]
If another instance tries to come online a warning will be put in the Event Log of the offending server and the service will not be allowed to start. These warnings can be picked up by our monitoring engine which I will cover in a later topic.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5