views:

261

answers:

2

I'm using WCF through Spring.net WCF integration link text

This works relatively fine, however it seems that WCF and Spring get in each other's way when instantiating client channels. This means that only a single client channel is created for a service and therefore the clients get a timeout after the configured timeout is expired since the same client channel has been open since it was instantiated by Spring.

To make the matters worst, once a channel goes to a fault state, it affect all users of that service since spring doesn't create a new channel for each user.

Has anyone managed to use WCF and Spring.net work together without these issues?

+1  A: 

I've created a small library to help you with Spring.NET in these circumstances. You can find the svn repo here. More info can be found on my blog.

BennyM
thanks Benny. I came across your library a while ago and it was the closest thing to what I needed. I managed to change it a little bit to fit my requirements (like interface inheritance), but the project got canned because of other WCF issues. Thanks very much for the help. You should submit your library to Spring!
Khash
A: 

Thank Barry for that great library. I have only one problem. It does not work with extended interfaces like this:

[ServiceContract]
public interface IService1
{
    [OperationContract]
    string GetA();
}
[ServiceContract]
public interface IService2 : IService1
{
    [OperationContract]
    string GetB();
}

I get always an exception like this:

"Method 'GetA' in type 'Proxy_c3319da14a5c4cf982837cec23670fd1' from assembly 'Spring.Proxy, Version=0.0.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07' does not have an implementation."

Any suggestion?

sandro