<?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: Abstracting Request State</title> <atom:link href="http://davybrion.com/blog/2009/01/abstracting-request-state/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2009/01/abstracting-request-state/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Sun, 20 May 2012 21:55:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Unit of Work, NHibnernate and Asp.Net MVC &#124; Tony Williams</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-105349</link> <dc:creator>Unit of Work, NHibnernate and Asp.Net MVC &#124; Tony Williams</dc:creator> <pubDate>Mon, 19 Mar 2012 14:46:32 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-105349</guid> <description>[...] IRequestState: An abstraction of the request state. [...]</description> <content:encoded><![CDATA[<p>[...] IRequestState: An abstraction of the request state. [...]</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-36259</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Thu, 15 Apr 2010 12:49:14 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-36259</guid> <description>@Careli rely on IDisposable quite heavily, so i make sure that disposable instances are disposed properly, but that&#039;s about itas long as you don&#039;t keep references alive somewhere, i don&#039;t think there will be any benefit from explicitly clearing your request state</description> <content:encoded><![CDATA[<p>@Carel</p><p>i rely on IDisposable quite heavily, so i make sure that disposable instances are disposed properly, but that&#8217;s about it</p><p>as long as you don&#8217;t keep references alive somewhere, i don&#8217;t think there will be any benefit from explicitly clearing your request state</p> ]]></content:encoded> </item> <item><title>By: Carel Lotz</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-36256</link> <dc:creator>Carel Lotz</dc:creator> <pubDate>Thu, 15 Apr 2010 12:24:20 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-36256</guid> <description>Hi DavyWhat are your thoughts w.r.t cleaning up the Request State?  Do you prefer just leaving it for the GC to take care of?  I see there is an OperationContext.OperationCompletedEvent that you can hook into should you need to do some RequestState cleanup.  What do you think?Carel</description> <content:encoded><![CDATA[<p>Hi Davy</p><p>What are your thoughts w.r.t cleaning up the Request State?  Do you prefer just leaving it for the GC to take care of?  I see there is an OperationContext.OperationCompletedEvent that you can hook into should you need to do some RequestState cleanup.  What do you think?</p><p>Carel</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-32802</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Fri, 19 Mar 2010 09:40:13 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-32802</guid> <description>@Robi host most of my WCF services in IIS, and then i indeed perform all the IOC wiring in global.asax</description> <content:encoded><![CDATA[<p>@Rob</p><p>i host most of my WCF services in IIS, and then i indeed perform all the IOC wiring in global.asax</p> ]]></content:encoded> </item> <item><title>By: Rob Gibbens</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-32710</link> <dc:creator>Rob Gibbens</dc:creator> <pubDate>Thu, 18 Mar 2010 17:35:40 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-32710</guid> <description>So, how does the WcfRequestState get wired up?  Is it in the Global.asax? In each WCF Service? In the attributes of the service?Thanks.</description> <content:encoded><![CDATA[<p>So, how does the WcfRequestState get wired up?  Is it in the Global.asax? In each WCF Service? In the attributes of the service?</p><p>Thanks.</p> ]]></content:encoded> </item> <item><title>By: kurt schroeder</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-32576</link> <dc:creator>kurt schroeder</dc:creator> <pubDate>Wed, 17 Mar 2010 18:22:17 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-32576</guid> <description>Thank you! There are times my focus in the stock market left me dry when it came to some techniques. This is a blatant lack of experience with good development patterns. however, the catching up part is fun (sometimes) This is an off topic quasi rant. I&#039;m loading the exhaustive market data for the past 2.5 years to correct some errant split adjustments. I know that stuff backwards and forwards,having done market analysis and trend charting systems for the past 5 years, but its left me with a conservative development model that keeps me, well, uninspired! This site and others like it are making me get back to the real world.
Appreciated!
KES</description> <content:encoded><![CDATA[<p>Thank you! There are times my focus in the stock market left me dry when it came to some techniques. This is a blatant lack of experience with good development patterns. however, the catching up part is fun (sometimes) This is an off topic quasi rant. I&#8217;m loading the exhaustive market data for the past 2.5 years to correct some errant split adjustments. I know that stuff backwards and forwards,having done market analysis and trend charting systems for the past 5 years, but its left me with a conservative development model that keeps me, well, uninspired! This site and others like it are making me get back to the real world.<br
/> Appreciated!<br
/> KES</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-32029</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 15 Mar 2010 08:03:58 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-32029</guid> <description>@Kurtthe ActiveSessionManager class (found here: http://davybrion.com/blog/2009/12/using-nhibernate-in-your-service-layer/) uses the RequestState to store and retrieve the NHibernate ISession instance for the current request.You create the ISession instance at the beginning of the request (in my case, through the construction of my UnitOfWork), and you get rid of it at the end of the request (by disposing my UnitOfWork, which in turn instructs the ActiveSessionManager to remove the current ISession from the RequestState)</description> <content:encoded><![CDATA[<p>@Kurt</p><p>the ActiveSessionManager class (found here: <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>) uses the RequestState to store and retrieve the NHibernate ISession instance for the current request.</p><p>You create the ISession instance at the beginning of the request (in my case, through the construction of my UnitOfWork), and you get rid of it at the end of the request (by disposing my UnitOfWork, which in turn instructs the ActiveSessionManager to remove the current ISession from the RequestState)</p> ]]></content:encoded> </item> <item><title>By: kurt schroeder</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-31927</link> <dc:creator>kurt schroeder</dc:creator> <pubDate>Sun, 14 Mar 2010 15:41:46 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-31927</guid> <description>without needing to be said, &quot;Yes I am still playing catchup on many concepts&quot;</description> <content:encoded><![CDATA[<p>without needing to be said, &#8220;Yes I am still playing catchup on many concepts&#8221;</p> ]]></content:encoded> </item> <item><title>By: kurt schroeder</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-31679</link> <dc:creator>kurt schroeder</dc:creator> <pubDate>Fri, 12 Mar 2010 18:56:09 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-31679</guid> <description>In the case of storing/retreaving an NHibernate session i&#039;m not sure where and how it is supposed to be stored. I have a class called RequestState, but have not progressed past this point. This is actually in reference to the yup above. I agree with Chuck, &quot;Good stuff. Learning lots&quot;. After spending a fair amount of time on this i have learned a lot even today. That said, it&#039;s time to ask for a little help How does the session state for NHibernate get stored.Appreciated.
KES</description> <content:encoded><![CDATA[<p>In the case of storing/retreaving an NHibernate session i&#8217;m not sure where and how it is supposed to be stored. I have a class called RequestState, but have not progressed past this point. This is actually in reference to the yup above. I agree with Chuck, &#8220;Good stuff. Learning lots&#8221;. After spending a fair amount of time on this i have learned a lot even today. That said, it&#8217;s time to ask for a little help How does the session state for NHibernate get stored.</p><p>Appreciated.<br
/> KES</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-10040</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Tue, 17 Mar 2009 22:07:55 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-10040</guid> <description>&quot;Would the IRequestState be used in the ActiveSessionManager class to replace the field called “current?” &quot;yup :)and yeah, you could definitely use a Dictionary-based TestRequestState implementation for your tests</description> <content:encoded><![CDATA[<p>&#8220;Would the IRequestState be used in the ActiveSessionManager class to replace the field called “current?” &#8221;</p><p>yup <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>and yeah, you could definitely use a Dictionary-based TestRequestState implementation for your tests</p> ]]></content:encoded> </item> <item><title>By: Chuck</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-10039</link> <dc:creator>Chuck</dc:creator> <pubDate>Tue, 17 Mar 2009 22:01:57 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-10039</guid> <description>Davy -Just catching up on your post. Does this tie into your unit of work article? Would the IRequestState be used in the ActiveSessionManager class to replace the field called &quot;current?&quot;I was thinking that for testing, I would have an Implementation of IRequestState that did not depend on HttpContext. In order to keep with the IRequestState interface, it seems like I would need to use something like a Dictionary. Does that sound right?Good stuff. Learning lots.C</description> <content:encoded><![CDATA[<p>Davy &#8211;</p><p>Just catching up on your post. Does this tie into your unit of work article? Would the IRequestState be used in the ActiveSessionManager class to replace the field called &#8220;current?&#8221;</p><p>I was thinking that for testing, I would have an Implementation of IRequestState that did not depend on HttpContext. In order to keep with the IRequestState interface, it seems like I would need to use something like a Dictionary. Does that sound right?</p><p>Good stuff. Learning lots.</p><p>C</p> ]]></content:encoded> </item> <item><title>By: Dew Drop &#8211; January 17, 2009 &#124; Alvin Ashcraft's Morning Dew</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7880</link> <dc:creator>Dew Drop &#8211; January 17, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator> <pubDate>Mon, 19 Jan 2009 12:26:04 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7880</guid> <description>[...] Abstracting Request State (Davy Brion) [...]</description> <content:encoded><![CDATA[<p>[...] Abstracting Request State (Davy Brion) [...]</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7878</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 19 Jan 2009 11:35:42 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7878</guid> <description>ah ok, i also thought it worked but i know that Ayende recently did some work on TransactionScope in the trunk so i wasn&#039;t sure... i think those changes were mostly MSDTC related though</description> <content:encoded><![CDATA[<p>ah ok, i also thought it worked but i know that Ayende recently did some work on TransactionScope in the trunk so i wasn&#8217;t sure&#8230; i think those changes were mostly MSDTC related though</p> ]]></content:encoded> </item> <item><title>By: Steve Degosserie</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7876</link> <dc:creator>Steve Degosserie</dc:creator> <pubDate>Mon, 19 Jan 2009 11:33:57 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7876</guid> <description>It works, I&#039;ve tested in the past (if my memory is not failing me lol) ... not sure if ISession is fully memory-transactional yet though (but that is rarely usefull anyway, you&#039;re usually supposed to throw away your ISession instance in case of a Tx Rollback).</description> <content:encoded><![CDATA[<p>It works, I&#8217;ve tested in the past (if my memory is not failing me lol) &#8230; not sure if ISession is fully memory-transactional yet though (but that is rarely usefull anyway, you&#8217;re usually supposed to throw away your ISession instance in case of a Tx Rollback).</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7875</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 19 Jan 2009 11:26:44 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7875</guid> <description>yes, i&#039;m talking about a WCF service layeri guess i could use WCF&#039;s transactional options, but so far this custom UoW approach is working pretty good so i&#039;m not just going to change it.btw, NHibernate does have support for TransactionScope (although that might just be in the current trunk, not sure about that) so what you&#039;re doing should work as well</description> <content:encoded><![CDATA[<p>yes, i&#8217;m talking about a WCF service layer</p><p>i guess i could use WCF&#8217;s transactional options, but so far this custom UoW approach is working pretty good so i&#8217;m not just going to change it.</p><p>btw, NHibernate does have support for TransactionScope (although that might just be in the current trunk, not sure about that) so what you&#8217;re doing should work as well</p> ]]></content:encoded> </item> <item><title>By: Steve Degosserie</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7874</link> <dc:creator>Steve Degosserie</dc:creator> <pubDate>Mon, 19 Jan 2009 11:20:26 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7874</guid> <description>Hello Davy,So your custom UoW starts NH transaction when you enter your service layer ... when you say &#039;service layer&#039;, are you talking about your WCF services, or another logical service layer below your WCF services ? if WCF service layer, why not use the transactional options of WCF over your custom implementation?What I&#039;m usually doing is have an interceptor on my Business Layer to start transactions that nest with the ones from the (WCF) service layer (if any) ... that&#039;s where System.Transactions TransactionScope come in handy ... but that implies that the underlying ORM used must support TransactionScope.</description> <content:encoded><![CDATA[<p>Hello Davy,</p><p>So your custom UoW starts NH transaction when you enter your service layer &#8230; when you say &#8216;service layer&#8217;, are you talking about your WCF services, or another logical service layer below your WCF services ? if WCF service layer, why not use the transactional options of WCF over your custom implementation?</p><p>What I&#8217;m usually doing is have an interceptor on my Business Layer to start transactions that nest with the ones from the (WCF) service layer (if any) &#8230; that&#8217;s where System.Transactions TransactionScope come in handy &#8230; but that implies that the underlying ORM used must support TransactionScope.</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7871</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 19 Jan 2009 09:50:05 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7871</guid> <description>the UoW implementation is probably very similar to other onesi didn&#039;t really say that TransactionScope isn&#039;t useful, just that i don&#039;t use it :)the only reason why i don&#039;t use it is because i just stick with the transactions that NHibernate provides me with, and that works well for me</description> <content:encoded><![CDATA[<p>the UoW implementation is probably very similar to other ones</p><p>i didn&#8217;t really say that TransactionScope isn&#8217;t useful, just that i don&#8217;t use it <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>the only reason why i don&#8217;t use it is because i just stick with the transactions that NHibernate provides me with, and that works well for me</p> ]]></content:encoded> </item> <item><title>By: Andy Pook</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7870</link> <dc:creator>Andy Pook</dc:creator> <pubDate>Mon, 19 Jan 2009 09:14:12 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7870</guid> <description>And that uses the same technique to ensure you always get the correct ambient transaction?
I assume that your custom UoW is similar to others out there? Giving nestable transaction scope, rollback, commit etc.
You intimate that TransactionScope isn&#039;t useful. What, essentially, do you see as the benefit of a custom UoW over TransactionScope?</description> <content:encoded><![CDATA[<p>And that uses the same technique to ensure you always get the correct ambient transaction?<br
/> I assume that your custom UoW is similar to others out there? Giving nestable transaction scope, rollback, commit etc.<br
/> You intimate that TransactionScope isn&#8217;t useful. What, essentially, do you see as the benefit of a custom UoW over TransactionScope?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7828</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Sun, 18 Jan 2009 17:21:10 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7828</guid> <description>i indeed use NHibernateI basically start a transaction whenever i enter my service layer, and everything that happens from then on is managed by the parent transaction.  I can call any piece of code knowing that everything that gets executed can be committed or rolled back by the parent transaction.  I use a custom Unit Of Work implementation for this.</description> <content:encoded><![CDATA[<p>i indeed use NHibernate</p><p>I basically start a transaction whenever i enter my service layer, and everything that happens from then on is managed by the parent transaction.  I can call any piece of code knowing that everything that gets executed can be committed or rolled back by the parent transaction.  I use a custom Unit Of Work implementation for this.</p> ]]></content:encoded> </item> <item><title>By: Andy Pook</title><link>http://davybrion.com/blog/2009/01/abstracting-request-state/comment-page-1/#comment-7826</link> <dc:creator>Andy Pook</dc:creator> <pubDate>Sun, 18 Jan 2009 17:12:52 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=857#comment-7826</guid> <description>violated: Sure, as far as the clr runtime spec is concerned. But then ThreadStatic is, as you&#039;ve discovered, pretty broken in asp anyway. (unless you really know where asp async method may not complete synchronously).TransactionScope: I assume from your comment that you use some ORM (NHibernate etc). Have you no need for ambient transaction/session to be able to compose various actions coded in separate methods/classes?</description> <content:encoded><![CDATA[<p>violated: Sure, as far as the clr runtime spec is concerned. But then ThreadStatic is, as you&#8217;ve discovered, pretty broken in asp anyway. (unless you really know where asp async method may not complete synchronously).</p><p>TransactionScope: I assume from your comment that you use some ORM (NHibernate etc). Have you no need for ambient transaction/session to be able to compose various actions coded in separate methods/classes?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/24 queries in 0.013 seconds using disk: basic
Object Caching 649/650 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-05-21 14:19:13 -->
