Section C.5. Instance Management


C.5. Instance Management

  1. Prefer the per-call instance mode.

  2. Avoid a sessionful service.

  3. If selecting SessionMode.Required on the contract, always explicitly set service instancing to InstanceContextMode.PerSession.

  4. If selecting SessionMode.NotAllowed on the contract, always configure the service instancing to InstanceContextMode.PerCall.

  5. Do not mix sessionful contracts and per-call contracts on the same service.

  6. Avoid a singleton unless you have a natural singleton.

  7. Use ordered delivery with a sessionful service.

  8. Avoid instance deactivation with a sessionful service.

  9. Avoid demarcating operations.




Programming WCF Services
Programming WCF Services
ISBN: 0596526997
EAN: 2147483647
Year: 2004
Pages: 148
Authors: Juval Lowy

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net