Maintaining State and Sequencing Operations in Windows Communication Foundation 4
- 11/23/2010
Summary
In this chapter, you have seen the different options that the WCF runtime provides for creating an instance of a service. A service instance can exist for the duration of a single operation or for the entire session, until the client application closes the connection. In many cases, a service instance is private to a client, but WCF also supports singleton service instances that can be shared by multiple instances of a client. You have also seen how you can selectively control which operations create a new session and which operations close a session. Finally, you saw how you can create a durable service with which you can maintain session state without requiring that the corresponding service instance is active. Durable services are ideal for building systems that involve potentially long-running sessions that need to be able to survive service shutdown and restart.