One more thing Craig,
On the client side the following test is failing : (Paste in WcfClientFixture)
[Test, ExpectedException(typeof(EndpointNotFoundException))]
public void ThrowsEndPointNotFoundException()
{
Func<IWindsorContainer> createLocalContainer = () =>
new WindsorContainer()
.AddFacility<WcfFacility>(f => f.CloseTimeout = TimeSpan.Zero)
.Register(
Component.For<Operations>()
.DependsOn(new { number = 42 })
.ActAs(new DefaultServiceModel().AddEndpoints(
WcfEndpoint.ForContract<IOperations>()
.BoundTo(new NetTcpBinding { PortSharingEnabled
= true })
.At("net.tcp://localhost/Operations1"))
)
);
windsorContainer.Register(
Component.For<IOperationsEx>()
.Named("operations")
.ActAs(new DefaultClientModel
{
Endpoint = WcfEndpoint
.BoundTo(new NetTcpBinding { PortSharingEnabled =
true })
.At("net.tcp://localhost/Operations2")
.AddExtensions(new ChannelReconnectPolicy())
})
);
IOperationsEx client;
using (createLocalContainer())
{
client = windsorContainer.Resolve<IOperationsEx>("operations");
client.Backup(new Dictionary<string, object>());
}
}
The exception thrown is ComponentActivatorException but I think you should
instead throw the inner exception, so that the test passes.
What do you think ?
This way makes it more natural and simple for the consumer.
Cheers
John
________________________________
From: Craig Neuwirt <[email protected]>
To: [email protected]
Sent: Tuesday, 1 September, 2009 9:25:49 AM
Subject: Re: WcfFacility policies
sure
On Mon, Aug 31, 2009 at 6:18 PM, John Simons <[email protected]> wrote:
>Craig,
>
>That's what I'm saying, I think you should use this as the default
>implementation of IChannelActionPolicy and if the user wants they can
>>register another implementation with a lower ExecutionOrder so that
>gets executed before.
>What do you think?
>
>
>
>
>On Aug 31, 11:52 pm, Craig Neuwirt <[email protected]> wrote:
>> There are many ways to handle reconnection, so I didn't want to pick one by
>>> default.
>> I could probably use it as a default if none are specified.
>>
>> On Sat, Aug 29, 2009 at 9:39 PM, John Simons
>> <[email protected]>wrote:
>
>>
>>
>>
>> > I've noticed that the ChannelReconnectPolicy is not automatically
>> > added to the facility.
>> > Shouldn't this be an opt out instead ?
>>
>>> > I would think that 9/10 you want the facility to handle the
>> > CommunicationException automatically and recreate the channel.
>>
>> > Cheers
>> > John
>>>
>
__________________________________________________________________________________
Find local businesses and services in your area with Yahoo!7 Local.
Get started: http://local.yahoo.com.au
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---