<?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: Using NHibernate In Your Service Layer</title>
	<atom:link href="http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Wed, 08 Sep 2010 21:03:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-55304</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 22 Aug 2010 10:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-55304</guid>
		<description>yup :)

or you could use a session per batch of requests if you want</description>
		<content:encoded><![CDATA[<p>yup <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>or you could use a session per batch of requests if you want</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morten Jacobsen</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-55303</link>
		<dc:creator>Morten Jacobsen</dc:creator>
		<pubDate>Sun, 22 Aug 2010 10:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-55303</guid>
		<description>Yeah that makes sense... Would this be sort-of a session-per-request scenario then?</description>
		<content:encoded><![CDATA[<p>Yeah that makes sense&#8230; Would this be sort-of a session-per-request scenario then?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-55299</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sun, 22 Aug 2010 10:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-55299</guid>
		<description>@Morten

I&#039;ve never used the session-per-presenter strategy, nor would i recommend it actually.

What i would do in your scenario, would be to use an in-process Agatha service layer. It wouldn&#039;t use WCF, it would run completely in process, but you would have a completely separated service layer from your presentation layer and you could reuse all of the NHibernate related tricks that you find on this blog ;)</description>
		<content:encoded><![CDATA[<p>@Morten</p>
<p>I&#8217;ve never used the session-per-presenter strategy, nor would i recommend it actually.</p>
<p>What i would do in your scenario, would be to use an in-process Agatha service layer. It wouldn&#8217;t use WCF, it would run completely in process, but you would have a completely separated service layer from your presentation layer and you could reuse all of the NHibernate related tricks that you find on this blog <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morten Jacobsen</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-55220</link>
		<dc:creator>Morten Jacobsen</dc:creator>
		<pubDate>Sat, 21 Aug 2010 16:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-55220</guid>
		<description>Davy,

As always, excellent stuff.. I am trying to apply your ideas to my current project, but I have hit a problem on the way... The thing is I&#039;m doing a WinForms application, with a session-per-presenter strategy (in this case, it means one per form).. Now my repositories etc. need to access the session from the currently active form, but I am not sure how to loosely obtain a reference to the currently active form&#039;s session.. 

Any ideas?

From your blog it seems you mostly deal with WCF/WPF/silverlight and asp.net, I understand that this is perhaps a little outside your area, but maybe you could sketch a way you would do it, where you tasked with creating such an application..</description>
		<content:encoded><![CDATA[<p>Davy,</p>
<p>As always, excellent stuff.. I am trying to apply your ideas to my current project, but I have hit a problem on the way&#8230; The thing is I&#8217;m doing a WinForms application, with a session-per-presenter strategy (in this case, it means one per form).. Now my repositories etc. need to access the session from the currently active form, but I am not sure how to loosely obtain a reference to the currently active form&#8217;s session.. </p>
<p>Any ideas?</p>
<p>From your blog it seems you mostly deal with WCF/WPF/silverlight and asp.net, I understand that this is perhaps a little outside your area, but maybe you could sketch a way you would do it, where you tasked with creating such an application..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dilip Singh</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-40920</link>
		<dc:creator>Dilip Singh</dc:creator>
		<pubDate>Wed, 02 Jun 2010 06:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-40920</guid>
		<description>Thank you for sucha great post . If possible if you can attach a sample working solution with your post . I have also read &quot;Why You Shouldn’t Expose Your Entities Through Your Services&quot;. Great information and really out of the box thinking .</description>
		<content:encoded><![CDATA[<p>Thank you for sucha great post . If possible if you can attach a sample working solution with your post . I have also read &#8220;Why You Shouldn’t Expose Your Entities Through Your Services&#8221;. Great information and really out of the box thinking .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-37717</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Thu, 29 Apr 2010 12:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-37717</guid>
		<description>Thanks for the post! Just want to mention that NHibernate is good but it has some drawbacks as well. For example it cannot handle ASP.NET web gardens. So it is better to use a distributed caching product as a 2nd level cache. There are some third party caches providers like &lt;a href=&quot;http://www.alachisoft.com/ncache/nhibernate_index.html&quot; rel=&quot;nofollow&quot;&gt;NCache&lt;/a&gt;, which is a mature and well known distribute in-memory caching solution, offer appliance for NHibernate 2nd level caching without any code change.</description>
		<content:encoded><![CDATA[<p>Thanks for the post! Just want to mention that NHibernate is good but it has some drawbacks as well. For example it cannot handle ASP.NET web gardens. So it is better to use a distributed caching product as a 2nd level cache. There are some third party caches providers like <a href="http://www.alachisoft.com/ncache/nhibernate_index.html" rel="nofollow">NCache</a>, which is a mature and well known distribute in-memory caching solution, offer appliance for NHibernate 2nd level caching without any code change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-35319</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 05 Apr 2010 16:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-35319</guid>
		<description>@Afif

i&#039;ve tried to answer your question in &lt;a href=&quot;http://davybrion.com/blog/2010/04/clients-shouldnt-define-your-services/&quot; rel=&quot;nofollow&quot;&gt;this post&lt;/a&gt;... i hope it helps :)</description>
		<content:encoded><![CDATA[<p>@Afif</p>
<p>i&#8217;ve tried to answer your question in <a href="http://davybrion.com/blog/2010/04/clients-shouldnt-define-your-services/" rel="nofollow">this post</a>&#8230; i hope it helps <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clients Shouldn&#8217;t Define Your Services &#124; The Inquisitive Coder &#8211; Davy Brion&#39;s Blog</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-35317</link>
		<dc:creator>Clients Shouldn&#8217;t Define Your Services &#124; The Inquisitive Coder &#8211; Davy Brion&#39;s Blog</dc:creator>
		<pubDate>Mon, 05 Apr 2010 16:35:59 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-35317</guid>
		<description>[...] Comments Afif on Using NHibernate In Your Service LayerDavid Boike on MSDTC Woes With NServiceBus And NHibernateForcibly creating a distributed .NET [...]</description>
		<content:encoded><![CDATA[<p>[...] Comments Afif on Using NHibernate In Your Service LayerDavid Boike on MSDTC Woes With NServiceBus And NHibernateForcibly creating a distributed .NET [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Afif</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-35269</link>
		<dc:creator>Afif</dc:creator>
		<pubDate>Mon, 05 Apr 2010 11:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-35269</guid>
		<description>Davy, I am not sure if there&#039;s a short or long answer to this. But any pointers would be really appreciated. My architecture at works requires a web app and a windows app to talk to the application server via WCF. The Application server being where all the Data access and Service libraries live. I intend to implement N-hibernate into the project. But wanted to get some pointers if your approach above is recommended for Web and Windows clients alike when sending and receiving data via WCF? Great article by the way., your style of blogging is really clear and concise. Helps a great deal in understanding and working towards a better development repertoire. 
Thanks! :-)</description>
		<content:encoded><![CDATA[<p>Davy, I am not sure if there&#8217;s a short or long answer to this. But any pointers would be really appreciated. My architecture at works requires a web app and a windows app to talk to the application server via WCF. The Application server being where all the Data access and Service libraries live. I intend to implement N-hibernate into the project. But wanted to get some pointers if your approach above is recommended for Web and Windows clients alike when sending and receiving data via WCF? Great article by the way., your style of blogging is really clear and concise. Helps a great deal in understanding and working towards a better development repertoire.<br />
Thanks! <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kurt schroeder</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-31533</link>
		<dc:creator>kurt schroeder</dc:creator>
		<pubDate>Thu, 11 Mar 2010 13:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-31533</guid>
		<description>Consider it done! i&#039;ll give you my cell off line just send me an Email!</description>
		<content:encoded><![CDATA[<p>Consider it done! i&#8217;ll give you my cell off line just send me an Email!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-31492</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Thu, 11 Mar 2010 06:13:45 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-31492</guid>
		<description>i&#039;ll have the tall cappuccino :)</description>
		<content:encoded><![CDATA[<p>i&#8217;ll have the tall cappuccino <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kurt schroeder</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-31461</link>
		<dc:creator>kurt schroeder</dc:creator>
		<pubDate>Wed, 10 Mar 2010 22:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-31461</guid>
		<description>I really want to thank you again for this article. This have made a huge difference just by walking the code of this and the other articles.
again, much appreciated. If/when you get to chicago i at least owe a coffee.
KES</description>
		<content:encoded><![CDATA[<p>I really want to thank you again for this article. This have made a huge difference just by walking the code of this and the other articles.<br />
again, much appreciated. If/when you get to chicago i at least owe a coffee.<br />
KES</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-25124</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Sat, 16 Jan 2010 15:06:46 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-25124</guid>
		<description>@Chuck

keep in mind that you&#039;re not obligated to use Setter injection with this... if you add the IUnitOfWork as a constructor dependency, it will work as well.  Though you&#039;d have to put it in the constructor of each derived class as well.</description>
		<content:encoded><![CDATA[<p>@Chuck</p>
<p>keep in mind that you&#8217;re not obligated to use Setter injection with this&#8230; if you add the IUnitOfWork as a constructor dependency, it will work as well.  Though you&#8217;d have to put it in the constructor of each derived class as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-25084</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Fri, 15 Jan 2010 23:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-25084</guid>
		<description>Never mind...I had not tested my Session Provider (I added a string to the constructor, which was not being provided). This caused that object to not create and that apparently bubbled up. Once I removed the string and retested, the Setter Injection works.

Eyes going squirrley...need pizza and beer.

Cheers
C</description>
		<content:encoded><![CDATA[<p>Never mind&#8230;I had not tested my Session Provider (I added a string to the constructor, which was not being provided). This caused that object to not create and that apparently bubbled up. Once I removed the string and retested, the Setter Injection works.</p>
<p>Eyes going squirrley&#8230;need pizza and beer.</p>
<p>Cheers<br />
C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-25083</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Fri, 15 Jan 2010 23:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-25083</guid>
		<description>I should have known the Angle Brackets wouldn&#039;t post. I think I remember Steve Boehlen having the same issue earlier :)</description>
		<content:encoded><![CDATA[<p>I should have known the Angle Brackets wouldn&#8217;t post. I think I remember Steve Boehlen having the same issue earlier <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chuck</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-25082</link>
		<dc:creator>Chuck</dc:creator>
		<pubDate>Fri, 15 Jan 2010 23:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-25082</guid>
		<description>Davy - I am really, really learning how far I still have to go when I codewalk your material. I took the day off just to spend with Agatha. I do have one question regarding using Setter Injection on the UoW variable.

How do I configure that?

I have already created a boot strap class that inherits from container, and I register it with:

Register(Lifestyle.Transient).

However, when I get to the part of Handler, it is always null. Would it have anything to do with RequestState? I am using the WcfRequestState implementation.

Cheers!

C</description>
		<content:encoded><![CDATA[<p>Davy &#8211; I am really, really learning how far I still have to go when I codewalk your material. I took the day off just to spend with Agatha. I do have one question regarding using Setter Injection on the UoW variable.</p>
<p>How do I configure that?</p>
<p>I have already created a boot strap class that inherits from container, and I register it with:</p>
<p>Register(Lifestyle.Transient).</p>
<p>However, when I get to the part of Handler, it is always null. Would it have anything to do with RequestState? I am using the WcfRequestState implementation.</p>
<p>Cheers!</p>
<p>C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-24773</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Wed, 13 Jan 2010 08:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-24773</guid>
		<description>@Asger

i only want my Repositories to access the ISession directly... the UnitOfWork provides an abstraction that is typically easier to muck/stub during tests</description>
		<content:encoded><![CDATA[<p>@Asger</p>
<p>i only want my Repositories to access the ISession directly&#8230; the UnitOfWork provides an abstraction that is typically easier to muck/stub during tests</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asger Hallas</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-24772</link>
		<dc:creator>Asger Hallas</dc:creator>
		<pubDate>Wed, 13 Jan 2010 08:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-24772</guid>
		<description>I&#039;m not quite sure, why you have the UnitOfWork class? It&#039;s seems that all it does is managing the session - which could just as well be done by the SessionManager. It&#039;s seems simpler. Why do you introduce the UoW instead of just using the session directly?</description>
		<content:encoded><![CDATA[<p>I&#8217;m not quite sure, why you have the UnitOfWork class? It&#8217;s seems that all it does is managing the session &#8211; which could just as well be done by the SessionManager. It&#8217;s seems simpler. Why do you introduce the UoW instead of just using the session directly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Must read and references Blog of developer Mikkel Ovesen</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-24237</link>
		<dc:creator>&#187; Must read and references Blog of developer Mikkel Ovesen</dc:creator>
		<pubDate>Fri, 08 Jan 2010 13:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-24237</guid>
		<description>[...] Read: http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/ [...]</description>
		<content:encoded><![CDATA[<p>[...] Read: <a href="http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/" rel="nofollow">http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #497</title>
		<link>http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/comment-page-1/#comment-23202</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #497</dc:creator>
		<pubDate>Mon, 14 Dec 2009 09:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=2036#comment-23202</guid>
		<description>[...] Using NHibernate In Your Service Layer - Davy Brion revisits the management of NHibernate Sessions in Service Layer projects with implementations of ISessionProvider, IActiveSessionManager and IUnitOfWork interfaces, along with the code to wire this solution into your application [...]</description>
		<content:encoded><![CDATA[<p>[...] Using NHibernate In Your Service Layer &#8211; Davy Brion revisits the management of NHibernate Sessions in Service Layer projects with implementations of ISessionProvider, IActiveSessionManager and IUnitOfWork interfaces, along with the code to wire this solution into your application [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
