tag:blogger.com,1999:blog-15136575.post4426965665222276072..comments2023-10-17T12:00:16.772+01:00Comments on Code rant: Windsor WCF IntegrationMike Hadlowhttp://www.blogger.com/profile/16441901713967254504noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-15136575.post-79547413472622779822009-09-07T12:00:46.568+01:002009-09-07T12:00:46.568+01:00Many thanks for the simple intro.Many thanks for the simple intro.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-15136575.post-11355642829062736762008-12-06T00:29:00.000+00:002008-12-06T00:29:00.000+00:00Yeah, that answers my question. Thanks.Yeah, that answers my question. Thanks.drunkirishcoderhttps://www.blogger.com/profile/11716864471002878149noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-60041771366132439282008-12-04T09:24:00.000+00:002008-12-04T09:24:00.000+00:00Daniel Jim,I don't know. I'll be the first to admi...Daniel Jim,<BR/><BR/>I don't know. I'll be the first to admit that I'm no WCF expert. Is this quote from Craig Neuwirt relevant?<BR/><BR/>"Automatic detection of unhanded channel faults and re-acquisition of new channel proxy<BR/><BR/>You can continue to use client proxy even after an exception occurs. By default WCF makes all faulted channels unavailable."Mike Hadlowhttps://www.blogger.com/profile/16441901713967254504noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-24999882804461610872008-12-03T20:13:00.000+00:002008-12-03T20:13:00.000+00:00Is the facility using a special proxy that will ha...Is the facility using a special proxy that will handle reset after faulting? Or is this just the default WCF proxy generated by the ChannelFactory?drunkirishcoderhttps://www.blogger.com/profile/11716864471002878149noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-35202887865224968762008-12-03T16:47:00.000+00:002008-12-03T16:47:00.000+00:00Fair enough :)How about in the trunk WCF Facility...Fair enough :)<BR/><BR/>How about in the trunk WCF Facility section of the Castle website, you go post a link to this blog post so that the next guy, like you, can find the info?<BR/><BR/><BR/>Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-15136575.post-73073401772389538212008-12-03T09:23:00.000+00:002008-12-03T09:23:00.000+00:00Anonymous,Thanks for a great comment.True, the Cas...Anonymous,<BR/><BR/>Thanks for a great comment.<BR/><BR/>True, the Castle documentation is not great. But to be fair it's mostly aimed at the release candidate, not the trunk. If you compile and use the Castle trunk in your software then you are playing with a work in progress. Of course it's not as reassuring as telling your boss that you are using a mature product from a recognised vendor.<BR/><BR/>I'm sure Hamilton Verissimo would love to have you, or anyone else, contribute to the Castle documentation, so to say that the community isn't given enough control over it is unfair.<BR/><BR/>I approach open source software from a slightly different angle. I ask myself, "would I like Ayende and Craig to work on my enterprise system?" Well of course I would. They are far far better programmers than I am and they are giving away code. I could try and integrate the Windsor IoC (a very mature and stable container) and WCF (one of Microsoft's core technologies) myself, but would I do as good a job? <BR/><BR/>I find it strange that developers are always ready to re-invent the wheel or copy and paste some code they find on a blog, but are reluctant to build and use open source frameworks. You have the code and the guy who wrote it is only an email away. You can judge for yourself if you think it's fit for purpose. Your boss hired you to write code from scratch, surely he should trust your judgment in choosing what code to include from 3rd parties?Mike Hadlowhttps://www.blogger.com/profile/16441901713967254504noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-3620167173220787292008-12-03T05:06:00.000+00:002008-12-03T05:06:00.000+00:00Fantastic!But, let's see - a build from a trunk on...Fantastic!<BR/><BR/>But, let's see - a build from a trunk on a completely undocument version for a 'enterprise system' :)<BR/><BR/>Whew, I'm struggling to get that.<BR/><BR/>Castle stack is tremendous. I love it. But it's downfall is that the community isn't given enough control over the document imo, OR isn't contributing enough to the document to make it more than what it is.<BR/><BR/>Something needs to be done, telling my client/boss that 'hey, it's not document but we have the trunk code to run our multi-billion dollar company gets people a bit nervous!<BR/><BR/>Thanks for your article, all the help we can get from guys like you really helps show off this great open source stack!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-15136575.post-47901317873838737272008-11-26T09:30:00.000+00:002008-11-26T09:30:00.000+00:00emq3Neil is correct. I've just modified the soluti...emq3<BR/><BR/>Neil is correct. I've just modified the solution so that the DefaultCustomerService implements IDisposable, I've also marked DefaultCustomerService as transient. I added a Debug.WriteLine() call to both the constructor and Dispose() method. Dispose was called immediately after the web service completed.<BR/><BR/>I've uploaded the new solution. If you get it again you'll see the changes.Mike Hadlowhttps://www.blogger.com/profile/16441901713967254504noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-80830582440349627222008-11-26T09:19:00.000+00:002008-11-26T09:19:00.000+00:00Colin,Yes, I like the fluent interface. I orginall...Colin,<BR/><BR/>Yes, I like the fluent interface. I orginally wrote this post using it. I then thought it would be nicer to show how you could serve/consume a component via WCF with simple XML configuration changes. Of course you have to decorate the WCF contract with Contract and Operation attributes, so it's never that simple. I wanted to someone who's familiar with WCF and Windsor how little work you need to do to use the facility.Mike Hadlowhttps://www.blogger.com/profile/16441901713967254504noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-78460245736810067452008-11-26T00:38:00.000+00:002008-11-26T00:38:00.000+00:00emq3, I would have thought that setting the lifest...emq3, I would have thought that setting the lifestyle on your service implementation to Transient (and all required dependencies) would have done that for you?Neil Mosafihttps://www.blogger.com/profile/15344599241111572695noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-70115586995731151382008-11-25T21:07:00.000+00:002008-11-25T21:07:00.000+00:00I've ben playing with the WCF Facility recently to...I've ben playing with the WCF Facility recently too. I wanted to be able to specify a bunch of dependencies to have a perWcfOperation lifestyle, similar to the perWebRequest lifestyle, so that when my service is instantiated, all it's dependencies will be cleaned up after the operation exits. I'm surprised that this doesn't exist already, actually. It took some doing but I finally managed it using a combination of ICallContextInitializer and AbstractLifestyleManager.<BR/><BR/>The tricky part though, was realising that this means that my service class needs to explicitly request it's dependencies becuase it is itself created before the ICallContextInitializer.BeforeInvoke method is called - ie it is created *outside* the context of a WCF operation.<BR/><BR/>So, Mike, I wondered if you'd encountered this problem during your own playtime?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-15136575.post-84599640955576945992008-11-25T18:38:00.000+00:002008-11-25T18:38:00.000+00:00The fluent interface is good and I'd recommend loo...The fluent interface is good and I'd recommend looking at the tests with the WCF facility, they show how to use it in a variety of situations and I found them very useful.Colin Jackhttps://www.blogger.com/profile/01403166737046938219noreply@blogger.com