<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Integrating Castle Windsor and NHibernate with WCF</title>
	<atom:link href="http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/</link>
	<description></description>
	<lastBuildDate>Tue, 16 Mar 2010 18:16:58 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-42914</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Thu, 15 Jan 2009 18:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-42914</guid>
		<description>Thx for the tip Jarod. My service doesn&#039;t implement an IDisposable so I don&#039;t have that particular problem. I clean up the NH session in the ReleaseInstance method as outlined in the post.

There&#039;s another I ran into earlier this week regarding concurrency. I&#039;ve willing to put my solution on the blog as soon as I&#039;ve got some time to spare :-)</description>
		<content:encoded><![CDATA[<p>Thx for the tip Jarod. My service doesn&#8217;t implement an IDisposable so I don&#8217;t have that particular problem. I clean up the NH session in the ReleaseInstance method as outlined in the post.</p>
<p>There&#8217;s another I ran into earlier this week regarding concurrency. I&#8217;ve willing to put my solution on the blog as soon as I&#8217;ve got some time to spare <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarod Ferguson</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-42885</link>
		<dc:creator>Jarod Ferguson</dc:creator>
		<pubDate>Thu, 15 Jan 2009 04:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-42885</guid>
		<description>Jan,
I also use a similar approach (w/ Unity &amp; EF). When doing some profiling the past few days I noticed that the service itself was not being disposed, even though it implements IDispoable. (I clean up the EF context there)

It appears when using the IInstanceProvider, ReleaseContext will not Dispose of the service itself. I added the following code, which seems to work well. (w/ a battery of tests, faults, exceptions etc). 

public void ReleaseInstance(InstanceContext instanceContext, object instance)
        {
            //snip...

            var serviceInstance = instance as IDisposable;
            if(serviceInstance != null)
            {
                serviceInstance.Dispose();
            }
        }

Mem leak no more ;)</description>
		<content:encoded><![CDATA[<p>Jan,<br />
I also use a similar approach (w/ Unity &amp; EF). When doing some profiling the past few days I noticed that the service itself was not being disposed, even though it implements IDispoable. (I clean up the EF context there)</p>
<p>It appears when using the IInstanceProvider, ReleaseContext will not Dispose of the service itself. I added the following code, which seems to work well. (w/ a battery of tests, faults, exceptions etc). </p>
<p>public void ReleaseInstance(InstanceContext instanceContext, object instance)<br />
        {<br />
            //snip&#8230;</p>
<p>            var serviceInstance = instance as IDisposable;<br />
            if(serviceInstance != null)<br />
            {<br />
                serviceInstance.Dispose();<br />
            }<br />
        }</p>
<p>Mem leak no more <img src='http://elegantcode.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-42327</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Sat, 10 Jan 2009 09:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-42327</guid>
		<description>Drop me an e-mail, and I&#039;ll send it to you.</description>
		<content:encoded><![CDATA[<p>Drop me an e-mail, and I&#8217;ll send it to you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-42171</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Thu, 08 Jan 2009 22:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-42171</guid>
		<description>Actually, yes please. I&#039;d also like to ask your advice about which versions of the NH / Castle / NHibernate Facility to use.</description>
		<content:encoded><![CDATA[<p>Actually, yes please. I&#8217;d also like to ask your advice about which versions of the NH / Castle / NHibernate Facility to use.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Van Ryswyck</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-42067</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Wed, 07 Jan 2009 19:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-42067</guid>
		<description>It&#039;s just a thin wrapper around Castle Windsor. No big deal actually. I&#039;ll send it to you if you like?</description>
		<content:encoded><![CDATA[<p>It&#8217;s just a thin wrapper around Castle Windsor. No big deal actually. I&#8217;ll send it to you if you like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-41999</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 06 Jan 2009 21:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-41999</guid>
		<description>Any chance you can post the details on your DependencyContainer class?</description>
		<content:encoded><![CDATA[<p>Any chance you can post the details on your DependencyContainer class?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-41994</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 06 Jan 2009 20:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-41994</guid>
		<description>Nice example, but very frustrating as a novice to both WCF and NHibernate/Windsor. So much detail left out that it makes it difficult to see how all the pieces are interacting.

Thanks for the start.</description>
		<content:encoded><![CDATA[<p>Nice example, but very frustrating as a novice to both WCF and NHibernate/Windsor. So much detail left out that it makes it difficult to see how all the pieces are interacting.</p>
<p>Thanks for the start.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elegant Code &#187; Integrating Castle Windsor and NHibernate with WCF - Throwing the WCF facility and some Rhino Tools in the mix</title>
		<link>http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/comment-page-1/#comment-27256</link>
		<dc:creator>Elegant Code &#187; Integrating Castle Windsor and NHibernate with WCF - Throwing the WCF facility and some Rhino Tools in the mix</dc:creator>
		<pubDate>Mon, 14 Jul 2008 19:28:18 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/18/integrating-castle-windsor-and-nhibernate-with-wcf/#comment-27256</guid>
		<description>[...] while ago, I wrote this post about how to integrate Castle Windsor and NHibernate with WCF. Last weekend, I used the WCF [...]</description>
		<content:encoded><![CDATA[<p>[...] while ago, I wrote this post about how to integrate Castle Windsor and NHibernate with WCF. Last weekend, I used the WCF [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
