diff --git a/doc/reference/src/wcf.xml b/doc/reference/src/wcf.xml index 4a46fa0e..e2f31fcd 100644 --- a/doc/reference/src/wcf.xml +++ b/doc/reference/src/wcf.xml @@ -38,13 +38,30 @@
Configuring WCF services via Dependency Injection - In this approach the container will creates an implementation of - your service interface (a dynamic proxy) that retrieves a configured - instance of your service type from the Spring container. This dynamic - proxy is then the final service type that is hosted. + The technical approach used to perform dependency injection is based + on dynamically creating an implementation of your service interface (a + dynamic proxy) that retrieves a configured instance of your service type + from the Spring container. This dynamic proxy is then the final service + type that is hosted. + An alternative implementation approach that uses extensibility + points in WCF to delegate to Spring to create and configure your WCF + service was tried but proved to be limited in its range of + applicability. This approach was first taken (afaik) by Oran Dennison + on his blog + and several other folks on the web since then. The issue in using this + approach is that if the service is configured to be a singleton, for + example using + [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] + then the invocation of the IInstanceProvider is + short-circuited. See the notes on the MSDN class documentation here. + While this would be the preferred approach, no acceptable work around + was found. +
- Dependency Injection using dynamic proxies + Dependency Injection In this approach you develop your WCF services as you would normally do. For example here is a sample service type taken from the