An XML Web Service Singleton

You can easily adopt the example design pattern in a .NET Remoting scenario by using a component configured as a singleton. In an XML Web service, however, this option doesn’t appear. All XML Web services act intrinsically like single-call objects, and separate instances are created for each client. With this hard-wired design, is it possible to create an XML Web service that acts like a singleton?

The short answer is yes. You accomplish this trick by creating the XML Web service as an extra layer. The XML Web service then communicates with a singleton component. There are two possible ways for this communication to take place:

  • The XML Web service can communicate with a singleton component over .NET Remoting. This isn’t ...

Get Microsoft® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.