<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>f3yourmind &#187; Hibernate</title>
	<atom:link href="http://aslamkhan.net/tag/hibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://aslamkhan.net</link>
	<description>"There are no limits. There are only plateaus, and you must not stay there, you must go beyond them." - Bruce Lee</description>
	<lastBuildDate>Wed, 01 Sep 2010 22:25:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The optimistic concurrency gotcha</title>
		<link>http://aslamkhan.net/software-development/the-optimistic-concurrency-gotcha/</link>
		<comments>http://aslamkhan.net/software-development/the-optimistic-concurrency-gotcha/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 00:43:38 +0000</pubDate>
		<dc:creator>Aslam</dc:creator>
				<category><![CDATA[Architecture and Development]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://aslamkhan.net/software-development/the-optimistic-concurrency-gotcha/</guid>
		<description><![CDATA[In my current project, I have a group of about 7 budding young developers none of whom have done any significant web development.  This includes hitching up to a database and using object relational mappers.  The one thing that always gets first-timers is stateless nature of the web.  And the first solution they come up [...]]]></description>
			<content:encoded><![CDATA[<p>In my current project, I have a group of about 7 budding young developers none of whom have done any significant web development.  This includes hitching up to a database and using object relational mappers.  The one thing that always gets first-timers is stateless nature of the web.  And the first solution they come up with is session based statefulness which eventually leads to a scalability bottleneck.  The ripple effect of lack of state is that you need to have optimistic concurrency at the data access level.  Now most of us just assume that our OR Mapper will solve that for us.  And, yes, they do offer optimistic concurrency out of the box, be it with a version column or without.  But <a href="http://www.matshelander.com">Mats Helander</a> makes a strong point that optimistic concurrency in most (maybe all) OR Mappers actually kicks for really short durations (milliseconds).  In that case, you might as well be using good old fashioned database transactions.  Mats suggests that a way to solve the problem is to store original values in the view.  Check out Mats&#8217; <a href="http://www.matshelander.com/wordpress/?p=65">post</a> and you&#8217;ll see why you should be storing, at the very least, your <a href="http://www.hibernate.org">Hibernate</a> version column/property on your view as well.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Faslamkhan.net%2Fsoftware-development%2Fthe-optimistic-concurrency-gotcha%2F&amp;linkname=The%20optimistic%20concurrency%20gotcha"><img src="http://aslamkhan.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://aslamkhan.net/software-development/the-optimistic-concurrency-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
