<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.11" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Download the &#034;Spring in Production&#034; white paper</title>
	<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/</link>
	<description>The voice of SpringSource</description>
	<pubDate>Thu, 21 Aug 2008 19:19:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.11</generator>

	<item>
		<title>by: Mike Holland</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-79047</link>
		<pubDate>Fri, 14 Dec 2007 17:17:23 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-79047</guid>
					<description>[quote comment="63754"]Technically, Spring's Open Session in View support does not use a resource transaction but rather only uses auto-commit mode for any data access during view rendering (i.e. equivalent to short read-committed transactions for each such lazy loading statement).

So Adrian's point applies: Resource transactions should only be used for the controller part of the request lifecycle, not during view rendering. Of course, your point applies as well: Open Session in View style lazy loading is still fine during such view rendering![/quote]

However, if the controller part of the request lifecycle throws a HibernateOptimisticLockingException, then lazy loading fails during the view rendering (LazyInitializationException).  Surely it is better to start a read-only transaction around the view rendering, hence avoiding this problem?     

[However, I have not yet found a simple way of doing that - my current approach involves implementing a custom ViewResolver which returns proxy Views which take care of the read-only transactions..... any neater ideas would be appreciated!]</description>
		<content:encoded><![CDATA[<p>On November 12, 2007 at 4:20 am, Juergen Hoeller said:</p>
<blockquote cite="http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63754"><p>
Technically, Spring&#039;s Open Session in View support does not use a resource transaction but rather only uses auto-commit mode for any data access during view rendering (i.e. equivalent to short read-committed transactions for each such lazy loading statement).</p>
<p>So Adrian&#039;s point applies: Resource transactions should only be used for the controller part of the request lifecycle, not during view rendering. Of course, your point applies as well: Open Session in View style lazy loading is still fine during such view rendering!</p>
</blockquote>
<p>However, if the controller part of the request lifecycle throws a HibernateOptimisticLockingException, then lazy loading fails during the view rendering (LazyInitializationException).  Surely it is better to start a read-only transaction around the view rendering, hence avoiding this problem?     </p>
<p>[However, I have not yet found a simple way of doing that - my current approach involves implementing a custom ViewResolver which returns proxy Views which take care of the read-only transactions&#8230;.. any neater ideas would be appreciated!]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Juergen Hoeller</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63754</link>
		<pubDate>Mon, 12 Nov 2007 09:20:33 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63754</guid>
					<description>Technically, Spring's Open Session in View support does not use a resource transaction but rather only uses auto-commit mode for any data access during view rendering (i.e. equivalent to short read-committed transactions for each such lazy loading statement).

So Adrian's point applies: Resource transactions should only be used for the controller part of the request lifecycle, not during view rendering. Of course, your point applies as well: Open Session in View style lazy loading is still fine during such view rendering!</description>
		<content:encoded><![CDATA[<p>Technically, Spring&#039;s Open Session in View support does not use a resource transaction but rather only uses auto-commit mode for any data access during view rendering (i.e. equivalent to short read-committed transactions for each such lazy loading statement).</p>
<p>So Adrian&#039;s point applies: Resource transactions should only be used for the controller part of the request lifecycle, not during view rendering. Of course, your point applies as well: Open Session in View style lazy loading is still fine during such view rendering!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: links for 2007-11-12</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63726</link>
		<pubDate>Mon, 12 Nov 2007 08:25:25 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63726</guid>
					<description>[...] Interface21 Team Blog » Download the &#8220;Spring in Production&#8221; white paper We recently hosted a webinar on the theme of &#8220;Spring in Production.&#8221; I promised then to make the recording of the webinar and accompanying slides available on our website. Unfortunately the engineers producing the webinar for us forgot to set the &#8216;record&#8217; (tags: spring devAsigna) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Interface21 Team Blog » Download the &#034;Spring in Production&#034; white paper We recently hosted a webinar on the theme of &#034;Spring in Production.&#034; I promised then to make the recording of the webinar and accompanying slides available on our website. Unfortunately the engineers producing the webinar for us forgot to set the &#039;record&#039; (tags: spring devAsigna) [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Daniel Fernández Garrido</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63048</link>
		<pubDate>Sun, 11 Nov 2007 04:26:24 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63048</guid>
					<description>Oops, seems that less-than signs did not get escaped in my previous comment. The text I was quoting was:

----
 · Don't underestimate the cost of web content rendering. You definitely want to do this outside of a transaction.
----

Sorry for the mess,
Daniel.</description>
		<content:encoded><![CDATA[<p>Oops, seems that less-than signs did not get escaped in my previous comment. The text I was quoting was:</p>
<p>&#8212;-<br />
 · Don&#039;t underestimate the cost of web content rendering. You definitely want to do this outside of a transaction.<br />
&#8212;-</p>
<p>Sorry for the mess,<br />
Daniel.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Daniel Fernández Garrido</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63047</link>
		<pubDate>Sun, 11 Nov 2007 04:24:49 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-63047</guid>
					<description>I have read the white paper, liked it, and agreed 98% of it. Thanks for releasing it :-)

But here comes that 2% I don't agree with (until you convince me ;-)):

&#62;

Isn't this like stating that "Open Session in View" is some kind of anti-pattern? Or with that word "transaction" you mean "business logic read/write transaction"?

I mean: in my opinion, if we assume that painting some tags in a JSP is a very light operation and that we are not exporting some kind of one-thousand-lines unbuffered listing (which is the true scenario 90% of times), the *real* cost of web rendering will only come from SELECT queries on the database triggered from, for example, navigating some lazy associations in the view layer.

But we navigate these data because we need it to be shown, and are going to query for it anyways, be it while painting the view or before, at the controller or even business logic. So we won't really save in query time if we do queries before painting the view (okay, we can have wrongly configured lazy fetching settings). Even more, the business logic will certainly *not* be the place to do those view-helping queries as they are exclusively read-only and thus will perform better in a read-only transaction...

So, could you explain a little further on this topic? Are you really dismissing Open Session In View? If so... why?

Thanks for your work, and for sharing it.

Regards,
Daniel.</description>
		<content:encoded><![CDATA[<p>I have read the white paper, liked it, and agreed 98% of it. Thanks for releasing it <img src='http://blog.springsource.com/main/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>But here comes that 2% I don&#039;t agree with (until you convince me <img src='http://blog.springsource.com/main/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ):</p>
<p>&gt;</p>
<p>Isn&#039;t this like stating that &#034;Open Session in View&#034; is some kind of anti-pattern? Or with that word &#034;transaction&#034; you mean &#034;business logic read/write transaction&#034;?</p>
<p>I mean: in my opinion, if we assume that painting some tags in a JSP is a very light operation and that we are not exporting some kind of one-thousand-lines unbuffered listing (which is the true scenario 90% of times), the *real* cost of web rendering will only come from SELECT queries on the database triggered from, for example, navigating some lazy associations in the view layer.</p>
<p>But we navigate these data because we need it to be shown, and are going to query for it anyways, be it while painting the view or before, at the controller or even business logic. So we won&#039;t really save in query time if we do queries before painting the view (okay, we can have wrongly configured lazy fetching settings). Even more, the business logic will certainly *not* be the place to do those view-helping queries as they are exclusively read-only and thus will perform better in a read-only transaction&#8230;</p>
<p>So, could you explain a little further on this topic? Are you really dismissing Open Session In View? If so&#8230; why?</p>
<p>Thanks for your work, and for sharing it.</p>
<p>Regards,<br />
Daniel.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: springer</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62891</link>
		<pubDate>Sat, 10 Nov 2007 22:52:15 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62891</guid>
					<description>great job &lt;b&gt;Adrian&lt;/b&gt;!</description>
		<content:encoded><![CDATA[<p>great job <b>Adrian</b>!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Crowhoney.Com &#187; Download the &#34;Spring in Production&#34; white paper</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62458</link>
		<pubDate>Sat, 10 Nov 2007 07:09:03 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62458</guid>
					<description>[...] Weston Deboer wrote an interesting post today on Download the &#38;quot;Spring in Production&#38;quot; white paperHere&#8217;s a quick excerpt [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Weston Deboer wrote an interesting post today on Download the &amp;quot;Spring in Production&amp;quot; white paperHere&#039;s a quick excerpt [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: eqgy &#187; Blog Archiv &#187; Download the &#34;Spring in Production&#34; white paper</title>
		<link>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62292</link>
		<pubDate>Sat, 10 Nov 2007 00:40:16 +0000</pubDate>
		<guid>http://blog.springsource.com/main/2007/11/09/download-the-spring-in-production-white-paper/#comment-62292</guid>
					<description>[...] sourced here    Der Beitrag wurde am Friday, den 9. November 2007 um 16:03 Uhr ver&#246;ffentlicht und wurde unter download abgelegt. du kannst die Kommentare zu diesen Eintrag durch den RSS 2.0 Feed verfolgen. du kannst einen Kommentar schreiben, oder einen Trackback auf deiner Seite einrichten.      Einen Kommentar schreiben [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] sourced here    Der Beitrag wurde am Friday, den 9. November 2007 um 16:03 Uhr ver&ouml;ffentlicht und wurde unter download abgelegt. du kannst die Kommentare zu diesen Eintrag durch den RSS 2.0 Feed verfolgen. du kannst einen Kommentar schreiben, oder einen Trackback auf deiner Seite einrichten.      Einen Kommentar schreiben [&#8230;]
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
