<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Regular, Average Java Programmer (RAJP)  TM</title>
	<atom:link href="http://davidwburns.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidwburns.wordpress.com</link>
	<description>RAJP - [raj-pee]  Just one of the thousands of regular, average java programmers trying to get their job done  © 2008</description>
	<lastBuildDate>Fri, 13 Jan 2012 21:16:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='davidwburns.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/83ace93b16ebe90384c68adb69d121a7?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Regular, Average Java Programmer (RAJP)  TM</title>
		<link>http://davidwburns.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://davidwburns.wordpress.com/osd.xml" title="Regular, Average Java Programmer (RAJP)  TM" />
	<atom:link rel='hub' href='http://davidwburns.wordpress.com/?pushpress=hub'/>
		<item>
		<title>The Javaone Blues</title>
		<link>http://davidwburns.wordpress.com/2010/12/01/the-javaone-blues/</link>
		<comments>http://davidwburns.wordpress.com/2010/12/01/the-javaone-blues/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 04:58:48 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracle openworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=291</guid>
		<description><![CDATA[Late posting this&#8230;no recording for you yet, but here it is nonetheless. The Javaone Blues Where&#8217;s my coffee, where&#8217;s my junk? It&#8217;s hard to get a snack from this Oracle punk! Goodbye Gosling, Goodbye Bloch, It&#8217;s so freakin&#8217; hard to hear the other guys talk. I&#8217;ve got the Javaone blues! Suits and ties, Elastic Clouds, <a href="http://davidwburns.wordpress.com/2010/12/01/the-javaone-blues/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=291&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Late posting this&#8230;no recording for you yet, but here it is nonetheless.</p>
<h2>The Javaone Blues</h2>
<p>Where&#8217;s my coffee, where&#8217;s my junk?<br />
It&#8217;s hard to get a snack from this Oracle punk!<br />
Goodbye Gosling, Goodbye Bloch,<br />
It&#8217;s so freakin&#8217; hard to hear the other guys talk.<br />
I&#8217;ve got the Javaone blues!</p>
<p>Suits and ties, Elastic Clouds,<br />
Industry buzzwords bore the Javaone crowds.<br />
Launch our t-shirts, and give out Dukes<br />
This teleprompter drivel makes me wanna puke.<br />
I&#8217;ve got the Javaone Blues!</p>
<p>And I&#8217;m missing you,<br />
Missing you and the children, too.<br />
Missing your lovely face and warm embrace.<br />
And I&#8217;m missing you, and I know what I want to do.<br />
Want to get out of this place and back to you.</p>
<p>But I&#8217;ve got questions and problems to solve,<br />
And this Oracle thing has really got to evolve.<br />
Plus the Steve Miller Band and the Black-eyed Peas,<br />
Will be singing for us and our wine and cheese.<br />
I&#8217;ve got the Javaone Blues!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=291&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/12/01/the-javaone-blues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>Recant:  Scalable.DEFINITION != Elastic.DEFINITION</title>
		<link>http://davidwburns.wordpress.com/2010/09/22/recant-scalable-definition-elastic-definition/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/22/recant-scalable-definition-elastic-definition/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 17:02:19 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracle openworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=277</guid>
		<description><![CDATA[In my earlier post, That&#8217;s Right Oracle&#8230;, I stated that What we used to call scalable is now called “elastic” Ok, so it turns out that&#8217;s not exactly true.   Scalable and elastic should always go hand in hand when describing the properties of a Cloud architecture, but the term elastic emphasizes a more efficient tempering of <a href="http://davidwburns.wordpress.com/2010/09/22/recant-scalable-definition-elastic-definition/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=277&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my earlier post, <a href="http://davidwburns.wordpress.com/2010/09/20/thats-right-oracle-keep-us-far-away-from-ellison-and-keep-us-sudated/">That&#8217;s Right Oracle&#8230;</a>, I stated that</p>
<blockquote><p>What we used to call scalable is now called “elastic”</p></blockquote>
<p>Ok, so it turns out that&#8217;s not <em>exactly</em> true.   <em>Scalable</em> and <em>elastic</em> should always go hand in hand when describing the properties of a Cloud architecture, but the term <em>elastic</em> emphasizes a more efficient tempering of the scale.</p>
<p>Gartner gives an excellent summary:</p>
<blockquote><p><strong>Scalable and Elastic:</strong> The service can scale capacity up or down as the consumer demands at the speed of full automation (which may be seconds for some services and hours for others). Elasticity is a trait of shared pools of resources. Scalability is a feature of the underlying infrastructure and software platforms. Elasticity is associated with not only scale but also an economic model that enables scaling in both directions in an automated fashion. This means that services scale on demand to add or remove resources as needed.</p></blockquote>
<p>However!!!  You buzzword-dropping execs are not off the hook here!  You&#8217;re not impressing anyone!  <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   Consider speaking with you&#8217;re own words once and a while.  I know that creating a buzz is good for business.  You can make something out of nothing with a powerful enough word.  </p>
<blockquote><p> </p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=277&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/22/recant-scalable-definition-elastic-definition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>Java 7 (2011) and Java 8 (2012)- &#8220;Let&#8217;s get the platform moving again.&#8221;</title>
		<link>http://davidwburns.wordpress.com/2010/09/21/java-7-2011-and-java-8-2012-lets-get-the-platform-moving-again/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/21/java-7-2011-and-java-8-2012-lets-get-the-platform-moving-again/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 22:19:50 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java SE]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=266</guid>
		<description><![CDATA[Lest there be any doubt of Oracle&#8217;s commitment to the Java SE core, Mark Reinholt shared the previously TOP-SECRET projections for future Java SE releases. He shared his wishlist of core language enhancements which I&#8217;m quite sure some other blogger (most likely a JE&#8230;Java Expert) will cover ad nauseum (thank you, by the way, whomever <a href="http://davidwburns.wordpress.com/2010/09/21/java-7-2011-and-java-8-2012-lets-get-the-platform-moving-again/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=266&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Lest there be any doubt of Oracle&#8217;s commitment to the Java SE core, Mark Reinholt shared the previously TOP-SECRET projections for future Java SE releases. He shared his wishlist of core language enhancements which I&#8217;m quite sure some other blogger (most likely a JE&#8230;Java Expert) will cover ad nauseum (thank you, by the way, whomever you are, that will be awesome).  I look forward to be as confused about Lambda&#8217;s as I was about Generics.</p>
<p>The reason I am excited, is that I don&#8217;t want to believe that Java is becoming a legacy platform&#8230;like my first two platforms did (COBOL and Powerbuilder).   I&#8217;m sensing a willingness from Oracle to take some bold moves to bring Java into the 21st century of coding innovation.</p>
<p>Bravo!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=266&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/21/java-7-2011-and-java-8-2012-lets-get-the-platform-moving-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>Javaone &#8211;  A few complaints</title>
		<link>http://davidwburns.wordpress.com/2010/09/21/javaone-a-few-complaints/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/21/javaone-a-few-complaints/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 16:06:45 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracle openworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=259</guid>
		<description><![CDATA[Don&#8217;t get me wrong, friends.   This RAJP is having fun, but I have 4 other Javaones with which to prepare.  [a hint of smugness crosses his face for having not ending his sentence with a preposition...oh so smug].  Where&#8217;s the steady stream of junk food between sessions?  I couldn&#8217;t even find coffee most of the <a href="http://davidwburns.wordpress.com/2010/09/21/javaone-a-few-complaints/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=259&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t get me wrong, friends.   This RAJP is having fun, but I have 4 other Javaones with which to prepare.  [a hint of smugness crosses his face for having not ending his sentence with a preposition...oh so smug]. </p>
<ol>
<li>Where&#8217;s the steady stream of junk food between sessions?  I couldn&#8217;t even find coffee most of the day.  NO COFFEE?  Really guys?  You couldn&#8217;t use just a little more of my tuition for coffee?  Even the place that rotates my tires has free coffee!</li>
<li>Keynotes.  First off, as a Javaone attendee, I was not permitted to attend the Sunday night opening keynote.  Just not enough space?  Second, when I finally did get a keynote, it was suits talking business alignments and strategy.  Where are the t-shirt launchers?  Where are the weird little side shows and goofy scripted demos?  Where&#8217;s the innovation?  WHERE&#8217;S THE GEEK POWER THAT USED TO RUN THIS SHOW?  Why do these Oracle guys think we&#8217;d be interested in a bunch of boardroom buzzwords.  They can kiss my &#8220;Elastic Cloud&#8221;!!</li>
<li>Facility.  Loudest dang meeting room doors in a conference EVER.  <br />
[he catches a whiff of something...something right....something he needs....it's coffee...not just tables full of emtpy mugs...but actual coffee.]</li>
<li>MMMMMMMm&#8230;..coffee and banana nut bread!  So yummy&#8230;.now, what was I saying?  This is some good stuff.  Moist.  Not too many nuts.    Woot.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/259/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/259/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/259/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=259&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/21/javaone-a-few-complaints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>Starting Javaone off with a&#8230;meh.</title>
		<link>http://davidwburns.wordpress.com/2010/09/20/starting-javaone-off-with-a-meh/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/20/starting-javaone-off-with-a-meh/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 18:23:23 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracle openworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=254</guid>
		<description><![CDATA[As a Javaone alumn (5 year), I can say that I really miss starting the conference with a rousing, go-java-go, t-shirt slinging, nerdfest keynote.  Hopefully, I&#8217;ll feel better after the late afternoon keynote&#8230;but, I&#8217;m betting on a collective&#8230;meh.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=254&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As a Javaone alumn (5 year), I can say that I really miss starting the conference with a rousing, go-java-go, t-shirt slinging, nerdfest keynote.  Hopefully, I&#8217;ll feel better after the late afternoon keynote&#8230;but, I&#8217;m betting on a collective&#8230;meh.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=254&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/20/starting-javaone-off-with-a-meh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>That&#8217;s right Oracle, keep us far away from Ellison and keep us sedated!</title>
		<link>http://davidwburns.wordpress.com/2010/09/20/thats-right-oracle-keep-us-far-away-from-ellison-and-keep-us-sudated/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/20/thats-right-oracle-keep-us-far-away-from-ellison-and-keep-us-sudated/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 16:30:01 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracleworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=241</guid>
		<description><![CDATA[So, Oracle&#8217;s strategy for keeping peace at the conference is internment and booze.   I was one of the many javaone attendees who was intercepted trying to attend the opening keynote speech by Larry Ellison.  If you managed to get past the security guard (yes!  effing SECURITY guard) at the escalator, then you were probably identified by <a href="http://davidwburns.wordpress.com/2010/09/20/thats-right-oracle-keep-us-far-away-from-ellison-and-keep-us-sudated/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=241&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, Oracle&#8217;s strategy for keeping peace at the conference is internment and booze.   I was one of the many javaone attendees who was intercepted trying to attend the opening keynote speech by Larry Ellison.  If you managed to get past the security guard (yes!  effing SECURITY guard) at the escalator, then you were probably identified by sight from about 20 yards by a conference staffer (or perhaps their&#8217;s an RFID chip in our badges) and then told, &#8220;We&#8217;ve had a change of plan.  Javaone has something fun for you at the Hilton.&#8221;  To which I responded, &#8220;Great!  That DOES sound fun, but we want to hear what Ellison has to say.&#8221;  Denied. </p>
<p>Turns out, we were able to catch part of his talk via simulcast at the Hilton.  Let me break it down for you:</p>
<p>What we used to call scalable is now called &#8220;elastic&#8221;, and management types LOVE to play with the word &#8220;cloud&#8221;.  Even better:  Elastic Cloud.</p>
<p>Ok, so &#8220;internment&#8221; is a bit of a stretch.  We had a good time with good food and plenty to drink, and occasionally, we even looked up at the enormous screens and caught a snippet of what Ellison had to say.  He talked.  And talked. And talked and used a nifty powerpoint presentation with lots of bullet points.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/241/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=241&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/20/thats-right-oracle-keep-us-far-away-from-ellison-and-keep-us-sudated/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>
	</item>
		<item>
		<title>Preparing for San Francisco (Javaone)&#8230;forget the code, let&#8217;s talk fashion.</title>
		<link>http://davidwburns.wordpress.com/2010/09/17/preparing-for-san-francisco-javaone-forget-the-code-lets-talk-fashion/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/17/preparing-for-san-francisco-javaone-forget-the-code-lets-talk-fashion/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 21:09:20 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracleworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=234</guid>
		<description><![CDATA[This will be my 6th trip to San Francisco for a conference (5th Javaone).    Packing for SF isn&#8217;t too difficult as long as you know what to expect in September:  Cool foggy mornings, mild to warm days,  chilly evenings.   I do a lot of walking in this city,  so the weather is a <a href="http://davidwburns.wordpress.com/2010/09/17/preparing-for-san-francisco-javaone-forget-the-code-lets-talk-fashion/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=234&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This will be my 6th trip to San Francisco for a conference (5th Javaone).    Packing for SF isn&#8217;t too difficult as long as you know what to expect in September:  Cool foggy mornings, mild to warm days,  chilly evenings.   I do a lot of walking in this city,  so the weather is a big consideration.   San Francisco has made this climate into a style.  At least in my mind, there are few typical looks.</p>
<ul>
<li>kind of an urban, downtown, hiker look (urban hiker) &#8230;very practical<br />
<img src="http://i702.photobucket.com/albums/ww30/theurbangent/ec06ac4b.jpg" alt="ec06ac4b.jpg picture by theurbangent" /></li>
<li>another standard look is the &#8220;smart casual&#8221;.  Very stylish, tailored, casual (will get you into most restaurants and clubs).  No plain clothes (leave the khakis and polo at home!)<br />
<img src="http://media1.boxwish.com/pages/large/33/movies_get_tom_hansens_smart_casual_work_look_from_500_days_of_summer_001.jpg?1267029263" alt="" /> <img src="http://dailyfashionandstyle.com/img/arts/2010/Aug/30/661/jcrew_fall_mens_4.jpg" alt="" /></li>
<li>urban indie (graphic tees, slim/skinny jeans, converse/van shoes, etc, hoody)<br />
<img src="http://i702.photobucket.com/albums/ww30/theurbangent/1ab0792a.jpg" alt="Photobucket" /></li>
</ul>
<p>The San Francisco version of all these things include a way to keep warm at night and way to walk a lot:</p>
<ul>
<li>ball caps</li>
<li>any kind of fashion hat (fedora, driving, newsboy, etc.)</li>
<li>Some sort of outer wear (athletic cut sport coat, pullover, casual jacket, thermal jacket)</li>
<li>scarves/gloves</li>
<li>thermal long-sleeve under your t-shirt</li>
<li>shoes that you can stand to walk 3-5 miles in</li>
</ul>
<p>San Francisco is a stylin&#8217; city.  Even the bums have style!</p>
<p><img src="http://www.comedycentral.com/tosh.0/files/2010/03/homeless-chic.jpg" alt="" /></p>
<p>But leave the suit and tie at home unless you&#8217;re planning on attending opening night at the opera (no opening nights during the conference!);  otherwise, even opera attire is fairly casual.</p>
<p>One more thing.  Bring something to carry stuff in.  Backpack, man purse, your conference bag, satchel&#8230;whatever.   Walking and public transit is the way to go in the city (lot&#8217;s of fun to ride the trolleys and vintage trains!), and you&#8217;re going to want stuff with you.</p>
<p>My experience with wearing conference badges and carrying conference bags&#8230;pros and cons.</p>
<p>Pros.  Conference attendee discounts and easy identification of other conference members&#8230;.unless you want to blend in with the locals.</p>
<p>Cons&#8230;.There are tons of hustlers in San Francisco.  Anything that reveals you as an out-of-towner will make you more of a target.</p>
<p>When I&#8217;m dressed wrong, SF can be uncomfortable.  When I&#8217;m dressed right, I love the weather pattern.  It&#8217;s either blazing hot in Oklahoma or freezing cold.  San Francisco is neither!</p>
<p>Here&#8217;s a great site for seeing the San Fran look!  <a href="http://streetpeeper.com/cities/san-francisco?page=1&amp;type=street_peep">http://streetpeeper.com/cities/san-francisco?page=1&amp;type=street_peep</a></p>
<p>One other possibility to consider if you&#8217;re coming from out of town:  explore something new!  San Francisco is a great place to freak out.  You will not look out of place dressed for the extreme.  This is freak city!  S&amp;M, drag, punk, emo, rocker, super gay, super butch, super geeky, geek chic, hippy, urban cowboy, or fashionista.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/234/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=234&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/17/preparing-for-san-francisco-javaone-forget-the-code-lets-talk-fashion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>

		<media:content url="http://i702.photobucket.com/albums/ww30/theurbangent/ec06ac4b.jpg" medium="image">
			<media:title type="html">ec06ac4b.jpg picture by theurbangent</media:title>
		</media:content>

		<media:content url="http://media1.boxwish.com/pages/large/33/movies_get_tom_hansens_smart_casual_work_look_from_500_days_of_summer_001.jpg?1267029263" medium="image" />

		<media:content url="http://dailyfashionandstyle.com/img/arts/2010/Aug/30/661/jcrew_fall_mens_4.jpg" medium="image" />

		<media:content url="http://i702.photobucket.com/albums/ww30/theurbangent/1ab0792a.jpg" medium="image">
			<media:title type="html">Photobucket</media:title>
		</media:content>

		<media:content url="http://www.comedycentral.com/tosh.0/files/2010/03/homeless-chic.jpg" medium="image" />
	</item>
		<item>
		<title>Handy dandy Netbeans feature:  Print to HTML</title>
		<link>http://davidwburns.wordpress.com/2010/09/17/handy-dandy-netbeans-feature-print-to-html/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/17/handy-dandy-netbeans-feature-print-to-html/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 17:47:18 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[print to html]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=226</guid>
		<description><![CDATA[In blogging, I often like to share some code.  Often times, I&#8217;ll just take a screen print, crop it, and upload it.   But yesterday I found another way to put formatted code in my posts using Netbeans:  Print to HTML.  It&#8217;s under the File menu. Open your source in Netbeans Click Print to HTML <a href="http://davidwburns.wordpress.com/2010/09/17/handy-dandy-netbeans-feature-print-to-html/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=226&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In blogging, I often like to share some code.  Often times, I&#8217;ll just take a screen print, crop it, and upload it.   But yesterday I found another way to put formatted code in my posts using Netbeans:  Print to HTML.  It&#8217;s under the File menu.</p>
<ol>
<li>Open your source in Netbeans</li>
<li>Click Print to HTML under the File menu</li>
<li>Choose between &#8220;Print to File&#8221; and &#8220;Print to Clipboard<br />
﻿<a href="http://davidwburns.files.wordpress.com/2010/09/fig392.jpg"><img class="aligncenter size-full wp-image-230" title="fig39" src="http://davidwburns.files.wordpress.com/2010/09/fig392.jpg?w=500&#038;h=199" alt="" width="500" height="199" /></a></li>
<li>Click the HTML tab (assuming you&#8217;re using WordPress</li>
<li>Paste in markup into your blog editor&#8230;et voila!</li>
</ol>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;"><span class="line-number"><br />
1</span> <span class="comment">/*</span></span></p>
<pre><span class="line-number"> 2</span> <span class="comment"> * To change this template, choose Tools | Templates</span>
<span class="line-number"> 3</span> <span class="comment"> * and open the template in the editor.</span>
<span class="line-number"> 4</span> <span class="comment"> */</span>
<span class="line-number"> 5</span>
<span class="line-number"> 6</span> <span class="keyword-directive">package</span> sample.transfer;
<span class="line-number"> 7</span>
<span class="line-number"> 8</span> <span class="keyword-directive">impo</span><span class="keyword-directive">rt</span> java.math.BigDecimal;
<span class="line-number"> 9</span>
<span class="line-number">10</span> <span class="comment">/**</span>
<span class="line-number">11</span> <span class="comment"> *</span>
<span class="line-number">12</span> <span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">david</span> <span class="comment">ctr</span> <span class="comment">wilson</span><span class="comment">-</span><span class="comment">bur</span>
<span class="line-number">13</span>  <span class="comment">*/</span>
<span class="line-number">14</span> <span class="keyword-directive">public</span> <span class="keyword-directive">class</span> ProductTO {
<span class="line-number">15</span>     <span class="keyword-directive">private</span> Integer productId;
<span class="line-number">16</span>     <span class="keyword-directive">private</span> String description;
<span class="line-number">17</span>     <span class="keyword-directive">private</span> BigDecimal purchaseCost;
<span class="line-number">18</span>
<span class="line-number">19</span>     <span class="keyword-directive">public</span> String getDescription() {
<span class="line-number">20</span>         <span class="keyword-directive">return</span> description;
<span class="line-number">21</span>     }
<span class="line-number">22</span>
<span class="line-number">23</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setDescription(String description) {
<span class="line-number">24</span>         <span class="keyword-directive">this</span>.description = description;
<span class="line-number">25</span>     }
<span class="line-number">26</span>
<span class="line-number">27</span>     <span class="keyword-directive">public</span> String getManufacturerName() {
<span class="line-number">28</span>         <span class="keyword-directive">return</span> manufacturerName;
<span class="line-number">29</span>     }
<span class="line-number">30</span>
<span class="line-number">31</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setManufacturerName(String manufacturerName) {
<span class="line-number">32</span>         <span class="keyword-directive">this</span>.manufacturerName = manufacturerName;
<span class="line-number">33</span>     }
<span class="line-number">34</span>
<span class="line-number">35</span>     <span class="keyword-directive">publ</span><span class="keyword-directive">ic</span> Integer getProductId() {
<span class="line-number">36</span>         <span class="keyword-directive">return</span> productId;
<span class="line-number">37</span>     }
<span class="line-number">38</span>
<span class="line-number">39</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setProductId(Integer productId) {
<span class="line-number">40</span>         <span class="keyword-directive">this</span>.productId = productId;
<span class="line-number">41</span>     }
<span class="line-number">42</span>
<span class="line-number">43</span>     <span class="keyword-directive">public</span> BigDecimal getPurchaseCost() {
<span class="line-number">44</span>         <span class="keyword-directive">return</span> purchaseCost;
<span class="line-number">45</span>     }
<span class="line-number">46</span>
<span class="line-number">47</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setPurchaseCost(BigDecimal purchaseCost) {
<span class="line-number">48</span>         <span class="keyword-directive">this</span>.purchaseCost = purchaseCost;
<span class="line-number">49</span>     }
<span class="line-number">50</span>     <span class="keyword-directive">private</span> String manufacturerName;
<span class="line-number">51</span>
<span class="line-number">52</span>
<span class="line-number">53</span>
<span class="line-number">54</span> }
<span class="line-number">55</span>
<span class="line-number">56</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=226&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/17/handy-dandy-netbeans-feature-print-to-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>

		<media:content url="http://davidwburns.files.wordpress.com/2010/09/fig392.jpg" medium="image">
			<media:title type="html">fig39</media:title>
		</media:content>
	</item>
		<item>
		<title>Performance Trap using JPA:  Transfer Object pattern and JPQL to the Rescue!</title>
		<link>http://davidwburns.wordpress.com/2010/09/15/performance-trap-using-jpa-transfer-object-pattern-and-jpql-to-the-rescue/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/15/performance-trap-using-jpa-transfer-object-pattern-and-jpql-to-the-rescue/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 21:43:08 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Java Persistence API]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=187</guid>
		<description><![CDATA[DISCLAIMER:  I am a Regular Average Java Programmer; an anti-expert.  I like to do things right, but I&#8217;m generally satisfied with doing things that WORK.  I&#8217;m sure there&#8217;s some JP (Java Expert) out there who knows how to do it right and you can buy his book and worship his rightness at the Java Rock <a href="http://davidwburns.wordpress.com/2010/09/15/performance-trap-using-jpa-transfer-object-pattern-and-jpql-to-the-rescue/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=187&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>DISCLAIMER:  I am a Regular Average Java Programmer; an anti-expert.  I like to do things right, but I&#8217;m generally satisfied with doing things that WORK.  I&#8217;m sure there&#8217;s some JP (Java Expert) out there who knows how to do it right and you can buy his book and worship his rightness at the Java Rock Star Hall of Fame.</em></p>
<p>Can I say that I love JAX-WS with JPA with Netbeans?  This is a golden combination folks.  Netbeans supports the hell out of these things.  But there are some traps.  One of which is the potential for very poor performance.  But I will show you how to avoid this with a simple design pattern:   Transfer Object.</p>
<p>Transfer Object is so crucial when using JPA.  I realize that we should all know this, but Netbeans does not generate Transfer Objects for you like they do Controllers and Entities.  You have to do it yourself.  And you probably <em>should </em>have to.  After all, how can Netbeans anticipate the specific data transfer needs of your crappy application?</p>
<p>Let&#8217;s break it down!</p>
<h2>What is a Transfer Object?</h2>
<p>Here&#8217;s a pretty comprehensive technical breakdown from java.sun.com  (he he&#8230;sun)</p>
<p><a href="http://java.sun.com/blueprints/patterns/TransferObject.html">http://java.sun.com/blueprints/patterns/TransferObject.html</a></p>
<p>Now, let&#8217;s just put it into RAJP terms.  <strong>A Transfer Object (or Value Object) is just the attributes needed for a particular <a href="http://en.wikipedia.org/wiki/Use_case_diagram">use case</a></strong><strong> all wrapped up together in one object.</strong></p>
<h2><strong>What Problems does it solve with JPA?</strong></h2>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller">Separation of the concerns of the Model with the View</a></li>
<li>Poor performance due to Network Traffic</li>
<li>Poor performance due to High Latency</li>
</ol>
<p>In <a href="http://en.wikipedia.org/wiki/Java_Persistence_API">Java Persistence API (JPA)</a>, your basic representation of a row in the database is called an Entity.  An Entity is a special kind of Java Bean that knows a lot about how to map a database table to an object.  So it&#8217;s not just instance variables, getters, and setters.  It&#8217;s a powerful little guy that you don&#8217;t want just any tier of your enterprise to have access to.    It&#8217;s also an expensive little guy.  In fact, depending on how it relates to other entities it might not be so little at all.  One entity that is joined with other entities might pull in a whole universe of data. And worse, it might even be like a House of Mirrors; creating an infinite graph of data.  AHHHHHHH!!!  Let me out of here!!!!</p>
<p><img src="http://t2.gstatic.com/images?q=tbn:3q_a1ALxeHB_-M:http://historyofeconomics.files.wordpress.com/2008/08/hall-of-mirrors.jpg&amp;t=1" alt="" /></p>
<p>For example, a Car might have a list of Dealers and a Dealer might have a list of Cars each of which has a list of Dealers, and so on!  Fortunately, JPA implementations do not infinitely load this stuff.  The problem only arises when you need to expose Entities to another tier or another application (say, with web services).</p>
<p>[Who am I kidding?  I don't REALLY have tiers!!  Everything I do is in the web tier!  But I do have services!]</p>
<h2>How do I do it?  &#8221;Is it magic?&#8221; you ask.  NO!!! It&#8217;s JAVA!  Nothing magical about it!  What do you think this is?  <a href="http://onlineslangdictionary.com/definition+of/rube">Ruby</a>?</h2>
<p>So, the idea is that you create these Transfer Objects with <em>only </em>the attributes that are required for the particular use case.    This separates the concerns of the Model from the View and minimizes network traffic, but it doesn&#8217;t necessarily solve the latency issue.  If your JPA calls are still retrieving and mapping gobs and gobs of data before you perform your transfer, then you may want to consider coding a more efficient JPQL query (or a stored procedure) and map the results directly into your Transfer Object.</p>
<p>Let&#8217;s look at how Netbeans builds entities and the inherent problems when it come to the way they handle web services.</p>
<p>Here&#8217;s an example of an Entity generated from a table in a relational database:</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;"><span class="line-number"><br />
1</span> <span class="comment">/*</span></span></p>
<pre><span class="line-number">  2</span> <span class="comment"> * To change this template, choose Tools | Templates</span>
<span class="line-number">  3</span> <span class="comment"> * and open the template in the editor.</span>
<span class="line-number">  4</span> <span class="comment"> */</span>
<span class="line-number">  5</span>
<span class="line-number">  6</span> <span class="keyword-directive">package</span> sample.persistence;
<span class="line-number">  7</span>
<span class="line-number">  8</span> <span class="keyword-directive">i</span><span class="keyword-directive">mport</span> java.io.Serializable;
<span class="line-number">  9</span> <span class="keyword-directive">import</span> java.math.BigDecimal;
<span class="line-number"> 10</span> <span class="keyword-directive">import</span> java.util.List;
<span class="line-number"> 11</span> <span class="keyword-directive">import</span> javax.persistence.Basic;
<span class="line-number"> 12</span> <span class="keyword-directive">import</span> javax.persistence.CascadeType;
<span class="line-number"> 13</span> <span class="keyword-directive">import</span> javax.persistence.Column;
<span class="line-number"> 14</span> <span class="keyword-directive">import</span> javax.persistence.Entity;
<span class="line-number"> 15</span> <span class="keyword-directive">import</span> javax.persistence.Id;
<span class="line-number"> 16</span> <span class="keyword-directive">import</span> javax.persistence.JoinColumn;
<span class="line-number"> 17</span> <span class="keyword-directive">import</span> javax.persistence.ManyToOne;
<span class="line-number"> 18</span> <span class="keyword-directive">import</span> javax.persistence.NamedQueries;
<span class="line-number"> 19</span> <span class="keyword-directive">import</span> javax.persistence.NamedQuery;
<span class="line-number"> 20</span> <span class="keyword-directive">import</span> javax.persistence.OneToMany;
<span class="line-number"> 21</span> <span class="keyword-directive">import</span> javax.persistence.Table;
<span class="line-number"> 22</span>
<span class="line-number"> 23</span> <span class="comment">/**</span>
<span class="line-number"> 24</span> <span class="comment"> *</span>
<span class="line-number"> 25</span> <span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">david</span> <span class="comment">ctr</span> <span class="comment">wilson</span><span class="comment">-</span><span class="comment">bur</span>
<span class="line-number"> 26</span>  <span class="comment">*/</span>
<span class="line-number"> 27</span> @Entity
<span class="line-number"> 28</span> @Table(name = <span class="character">"</span><span class="character">PRODUCT</span><span class="character">"</span>, catalog = <span class="character">""</span>, schema = <span class="character">"</span><span class="character">APP</span><span class="character">"</span>)
<span class="line-number"> 29</span> @NamedQueries({
<span class="line-number"> 30</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findAll</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p</span><span class="character">"</span>),
<span class="line-number"> 31</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByProductId</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.productId = :productId</span><span class="character">"</span>),
<span class="line-number"> 32</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByPurchaseCost</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.purchaseCost = :purchaseCost</span><span class="character">"</span>),
<span class="line-number"> 33</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByQuantityOnHand</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.quantityOnHand = :quantityOnHand</span><span class="character">"</span>),
<span class="line-number"> 34</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByMarkup</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.markup = :markup</span><span class="character">"</span>),
<span class="line-number"> 35</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByAvailable</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.available = :available</span><span class="character">"</span>),
<span class="line-number"> 36</span>     @NamedQuery(name = <span class="character">"</span><span class="character">Product.findByDescription</span><span class="character">"</span>, query = <span class="character">"</span><span class="character">SELECT p FROM Product p WHERE p.description = :description</span><span class="character">"</span>)})
<span class="line-number"> 37</span> <span class="keyword-directive">publ</span><span class="keyword-directive">ic</span> <span class="keyword-directive">class</span> Product <span class="keyword-directive">implements</span> Serializable {
<span class="line-number"> 38</span>     <span class="keyword-directive">private</span> <span class="keyword-directive">static</span> <span class="keyword-directive">final</span> <span class="keyword-directive">long</span> serialVersionUID = 1L;
<span class="line-number"> 39</span>     @Id
<span class="line-number"> 40</span>     @Basic(optional = <span class="keyword-directive">false</span>)
<span class="line-number"> 41</span>     @Column(name = <span class="character">"</span><span class="character">PRODUCT_ID</span><span class="character">"</span>)
<span class="line-number"> 42</span>     <span class="keyword-directive">p</span><span class="keyword-directive">rivate</span> Integer productId;
<span class="line-number"> 43</span>     @Column(name = <span class="character">"</span><span class="character">PURCHASE_COST</span><span class="character">"</span>)
<span class="line-number"> 44</span>     <span class="keyword-directive">private</span> BigDecimal purchaseCost;
<span class="line-number"> 45</span>     @Column(name = <span class="character">"</span><span class="character">QUANTITY_ON_HAND</span><span class="character">"</span>)
<span class="line-number"> 46</span>     <span class="keyword-directive">private</span> Integer quantityOnHand;
<span class="line-number"> 47</span>     @Column(name = <span class="character">"</span><span class="character">MARKUP</span><span class="character">"</span>)
<span class="line-number"> 48</span>     <span class="keyword-directive">private</span> BigDecimal markup;
<span class="line-number"> 49</span>     @Column(name = <span class="character">"</span><span class="character">AVAILABLE</span><span class="character">"</span>)
<span class="line-number"> 50</span>     <span class="keyword-directive">private</span> String available;
<span class="line-number"> 51</span>     @Column(name = <span class="character">"</span><span class="character">DESCRIPTION</span><span class="character">"</span>)
<span class="line-number"> 52</span>     <span class="keyword-directive">private</span> String description;
<span class="line-number"> 53</span>     @JoinColumn(name = <span class="character">"</span><span class="character">PRODUCT_CODE</span><span class="character">"</span>, referencedColumnName = <span class="character">"</span><span class="character">PROD_CODE</span><span class="character">"</span>)
<span class="line-number"> 54</span>     @ManyToOne(optional = <span class="keyword-directive">false</span>)
<span class="line-number"> 55</span>     <span class="keyword-directive">private</span> ProductCode productCode;
<span class="line-number"> 56</span>     @JoinColumn(name = <span class="character">"</span><span class="character">MANUFACTURER_ID</span><span class="character">"</span>, referencedColumnName = <span class="character">"</span><span class="character">MANUFACTURER_ID</span><span class="character">"</span>)
<span class="line-number"> 57</span>     @ManyToOne(optional = <span class="keyword-directive">false</span>)
<span class="line-number"> 58</span>     <span class="keyword-directive">private</span> Manufacturer manufacturer;
<span class="line-number"> 59</span>     @OneToMany(cascade = CascadeType.ALL, mappedBy = <span class="character">"</span><span class="character">product</span><span class="character">"</span>)
<span class="line-number"> 60</span>     <span class="keyword-directive">private</span> List&lt;PurchaseOrder&gt; purchaseOrderList;
<span class="line-number"> 61</span>
<span class="line-number"> 62</span>     <span class="keyword-directive">public</span> Product() {
<span class="line-number"> 63</span>     }
<span class="line-number"> 64</span>
<span class="line-number"> 65</span>     <span class="keyword-directive">public</span> Product(Integer productId) {
<span class="line-number"> 66</span>         <span class="keyword-directive">this</span>.productId = productId;
<span class="line-number"> 67</span>     }
<span class="line-number"> 68</span>
<span class="line-number"> 69</span>     <span class="keyword-directive">public</span> Integer getProductId() {
<span class="line-number"> 70</span>         <span class="keyword-directive">return</span> productId;
<span class="line-number"> 71</span>     }
<span class="line-number"> 72</span>
<span class="line-number"> 73</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setProductId(Integer productId) {
<span class="line-number"> 74</span>         <span class="keyword-directive">this</span>.productId = productId;
<span class="line-number"> 75</span>     }
<span class="line-number"> 76</span>
<span class="line-number"> 77</span>     <span class="keyword-directive">public</span> BigDecimal getPurchaseCost() {
<span class="line-number"> 78</span>         <span class="keyword-directive">return</span> purchaseCost;
<span class="line-number"> 79</span>     }
<span class="line-number"> 80</span>
<span class="line-number"> 81</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setPurchaseCost(BigDecimal purchaseCost) {
<span class="line-number"> 82</span>         <span class="keyword-directive">this</span>.purchaseCost = purchaseCost;
<span class="line-number"> 83</span>     }
<span class="line-number"> 84</span>
<span class="line-number"> 85</span>     <span class="keyword-directive">public</span> Integer getQuantityOnHand() {
<span class="line-number"> 86</span>         <span class="keyword-directive">return</span> quantityOnHand;
<span class="line-number"> 87</span>     }
<span class="line-number"> 88</span>
<span class="line-number"> 89</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setQuantityOnHand(Integer quantityOnHand) {
<span class="line-number"> 90</span>         <span class="keyword-directive">this</span>.quantityOnHand = quantityOnHand;
<span class="line-number"> 91</span>     }
<span class="line-number"> 92</span>
<span class="line-number"> 93</span>     <span class="keyword-directive">public</span> BigDecimal getMarkup() {
<span class="line-number"> 94</span>         <span class="keyword-directive">return</span> markup;
<span class="line-number"> 95</span>     }
<span class="line-number"> 96</span>
<span class="line-number"> 97</span>     <span class="keyword-directive">publi</span><span class="keyword-directive">c</span> <span class="keyword-directive">void</span> setMarkup(BigDecimal markup) {
<span class="line-number"> 98</span>         <span class="keyword-directive">this</span>.markup = markup;
<span class="line-number"> 99</span>     }
<span class="line-number">100</span>
<span class="line-number">101</span>     <span class="keyword-directive">public</span> String getAvailable() {
<span class="line-number">102</span>         <span class="keyword-directive">return</span> available;
<span class="line-number">103</span>     }
<span class="line-number">104</span>
<span class="line-number">105</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setAvailable(String available) {
<span class="line-number">106</span>         <span class="keyword-directive">this</span>.available = available;
<span class="line-number">107</span>     }
<span class="line-number">108</span>
<span class="line-number">109</span>     <span class="keyword-directive">public</span> String getDescription() {
<span class="line-number">110</span>         <span class="keyword-directive">return</span> description;
<span class="line-number">111</span>     }
<span class="line-number">112</span>
<span class="line-number">113</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">vo</span><span class="keyword-directive">id</span> setDescription(String description) {
<span class="line-number">114</span>         <span class="keyword-directive">this</span>.description = description;
<span class="line-number">115</span>     }
<span class="line-number">116</span>
<span class="line-number">117</span>     <span class="keyword-directive">public</span> ProductCode getProductCode() {
<span class="line-number">118</span>         <span class="keyword-directive">return</span> productCode;
<span class="line-number">119</span>     }
<span class="line-number">120</span>
<span class="line-number">121</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setProductCode(ProductCode productCode) {
<span class="line-number">122</span>         <span class="keyword-directive">this</span>.productCode = productCode;
<span class="line-number">123</span>     }
<span class="line-number">124</span>
<span class="line-number">125</span>     <span class="keyword-directive">public</span> Manufacturer getManufacturer() {
<span class="line-number">126</span>         <span class="keyword-directive">return</span> manufacturer;
<span class="line-number">127</span>     }
<span class="line-number">128</span>
<span class="line-number">129</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setManufacturer(Manufacturer manufacturer) {
<span class="line-number">130</span>         <span class="keyword-directive">this</span>.manufacturer = manufacturer;
<span class="line-number">131</span>     }
<span class="line-number">132</span>
<span class="line-number">133</span>     <span class="keyword-directive">public</span> List&lt;PurchaseOrder&gt; getPurchaseOrderList() {
<span class="line-number">134</span>         <span class="keyword-directive">return</span> purchaseOrderList;
<span class="line-number">135</span>     }
<span class="line-number">136</span>
<span class="line-number">137</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setPurchaseOrderList(List&lt;PurchaseOrder&gt; purchaseOrderList) {
<span class="line-number">138</span>         <span class="keyword-directive">this</span>.purchaseOrderList = purchaseOrderList;
<span class="line-number">139</span>     }
<span class="line-number">140</span>
<span class="line-number">141</span>     @Override
<span class="line-number">142</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">int</span> hashCode() {
<span class="line-number">143</span>         <span class="keyword-directive">int</span> hash = 0;
<span class="line-number">144</span>         hash += (productId != <span class="keyword-directive">null</span> ? productId.hashCode() : 0);
<span class="line-number">145</span>         <span class="keyword-directive">return</span> hash;
<span class="line-number">146</span>     }
<span class="line-number">147</span>
<span class="line-number">148</span>     @Override
<span class="line-number">149</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">boolean</span> equals(Object object) {
<span class="line-number">150</span>         <span class="comment">// TODO: Warning - this method won'</span><span class="comment">t work in the case the id fields are not set</span>
<span class="line-number">151</span>         <span class="keyword-directive">if</span> (!(object <span class="keyword-directive">instanceof</span> Product)) {
<span class="line-number">152</span>             <span class="keyword-directive">return</span> <span class="keyword-directive">false</span>;
<span class="line-number">153</span>         }
<span class="line-number">154</span>         Product other = (Product) object;
<span class="line-number">155</span>         <span class="keyword-directive">if</span> ((<span class="keyword-directive">this</span>.productId == <span class="keyword-directive">null</span> &amp;&amp; other.productId != <span class="keyword-directive">null</span>) || (<span class="keyword-directive">this</span>.productId != <span class="keyword-directive">null</span> &amp;&amp; !<span class="keyword-directive">this</span>.productId.equals(other.productId))) {
<span class="line-number">156</span>             <span class="keyword-directive">return</span> <span class="keyword-directive">false</span>;
<span class="line-number">157</span>         }
<span class="line-number">158</span>         <span class="keyword-directive">return</span> <span class="keyword-directive">true</span>;
<span class="line-number">159</span>     }
<span class="line-number">160</span>
<span class="line-number">161</span>     @Override
<span class="line-number">162</span>     <span class="keyword-directive">public</span> String toString() {
<span class="line-number">163</span>         <span class="keyword-directive">return</span> <span class="character">"</span><span class="character">sam</span><span class="character">ple.persistence.Product[productId=</span><span class="character">"</span> + productId + <span class="character">"</span><span class="character">]</span><span class="character">"</span>;
<span class="line-number">164</span>     }
<span class="line-number">165</span>
<span class="line-number">166</span> }
<span class="line-number">167</span>
<span class="line-number">168</span></pre>
<p>﻿﻿﻿﻿﻿﻿﻿Note that there are several joins with other entities.  Well each of those entities join back to Product!  This is helpful stuff, but there is the trap!  <strong>Do not let try to return this entity from a web service and do not try to replicate these relationships in your Transfer Object!  And DON&#8217;T CROSS THE STREAMS!!!!!!</strong></p>
<p><strong><img src="http://t1.gstatic.com/images?q=tbn:ANd9GcQZ3_jc0mQlNm39f6pM8t3hpo7-iRyu0cj8P4uenZ_UMeX53iQ&amp;t=1&amp;usg=__Pz6iOFujA5QOMkdEF5GuFpf-EOU=" alt="" /></strong></p>
<p>Here&#8217;s what will happen:</p>
<blockquote><p>com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML</p></blockquote>
<p>OH SNAP!!!  Whoa!!!  A bottomless pit of XML.  That sounds scary.  And I bet if you DID reach the bottom it would not be a soft landing.  XML is hard and scratchy!!!</p>
<p>Imagine with me a simple use case where a web application needs to show a Product catalog.  All you really need is Product Id (for retrieval purposes), Description, Cost,  and the name of the Manufacturer.  You might not want your web app to expose the Markup, the Quantity on Hand or other details.  So you design ProductTO (TO for TransferObject)  with only the fields needed for the catalog listing.</p>
<p><span style="line-height:normal;font-size:small;"><br />
</span></p>
<pre><span class="line-number"> 1</span> <span class="comment">/*</span>
<span class="line-number"> 2</span> <span class="comment"> * To change this template, choose Tools | Templates</span>
<span class="line-number"> 3</span> <span class="comment"> * and open the template in the editor.</span>
<span class="line-number"> 4</span> <span class="comment"> */</span>
<span class="line-number"> 5</span>
<span class="line-number"> 6</span> <span class="keyword-directive">package</span> sample.persistence;
<span class="line-number"> 7</span>
<span class="line-number"> 8</span> <span class="keyword-directive">i</span><span class="keyword-directive">mport</span> java.math.BigDecimal;
<span class="line-number"> 9</span>
<span class="line-number">10</span> <span class="comment">/**</span>
<span class="line-number">11</span> <span class="comment"> *</span>
<span class="line-number">12</span> <span class="comment"> * </span><span class="ST0">@author</span> <span class="comment">david</span> <span class="comment">ctr</span> <span class="comment">wilson</span><span class="comment">-</span><span class="comment">bur</span>
<span class="line-number">13</span>  <span class="comment">*/</span>
<span class="line-number">14</span> <span class="keyword-directive">public</span> <span class="keyword-directive">class</span> ProductTO {
<span class="line-number">15</span>     <span class="keyword-directive">private</span> Integer productId;
<span class="line-number">16</span>     <span class="keyword-directive">private</span> String description;
<span class="line-number">17</span>     <span class="keyword-directive">private</span> BigDecimal purchaseCost;
<span class="line-number">18</span>
<span class="line-number">19</span>     <span class="keyword-directive">public</span> String getDescription() {
<span class="line-number">20</span>         <span class="keyword-directive">return</span> description;
<span class="line-number">21</span>     }
<span class="line-number">22</span>
<span class="line-number">23</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setDescription(String description) {
<span class="line-number">24</span>         <span class="keyword-directive">this</span>.description = description;
<span class="line-number">25</span>     }
<span class="line-number">26</span>
<span class="line-number">27</span>     <span class="keyword-directive">public</span> String getManufacturerName() {
<span class="line-number">28</span>         <span class="keyword-directive">return</span> manufacturerName;
<span class="line-number">29</span>     }
<span class="line-number">30</span>
<span class="line-number">31</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setManufacturerName(String manufacturerName) {
<span class="line-number">32</span>         <span class="keyword-directive">this</span>.manufacturerName = manufacturerName;
<span class="line-number">33</span>     }
<span class="line-number">34</span>
<span class="line-number">35</span>     <span class="keyword-directive">publ</span><span class="keyword-directive">ic</span> Integer getProductId() {
<span class="line-number">36</span>         <span class="keyword-directive">return</span> productId;
<span class="line-number">37</span>     }
<span class="line-number">38</span>
<span class="line-number">39</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setProductId(Integer productId) {
<span class="line-number">40</span>         <span class="keyword-directive">this</span>.productId = productId;
<span class="line-number">41</span>     }
<span class="line-number">42</span>
<span class="line-number">43</span>     <span class="keyword-directive">public</span> BigDecimal getPurchaseCost() {
<span class="line-number">44</span>         <span class="keyword-directive">return</span> purchaseCost;
<span class="line-number">45</span>     }
<span class="line-number">46</span>
<span class="line-number">47</span>     <span class="keyword-directive">public</span> <span class="keyword-directive">void</span> setPurchaseCost(BigDecimal purchaseCost) {
<span class="line-number">48</span>         <span class="keyword-directive">this</span>.purchaseCost = purchaseCost;
<span class="line-number">49</span>     }
<span class="line-number">50</span>     <span class="keyword-directive">private</span> String manufacturerName;
<span class="line-number">51</span>
<span class="line-number">52</span>
<span class="line-number">53</span> }
<span class="line-number">54</span>
<span class="line-number">55</span></pre>
<p>One last convenience is to make a transfer method in your Entity class.</p>
<pre><span class="line-number">166</span>     <span class="keyword-directive">public</span> ProductTO transfer(){
<span class="line-number">167</span>         ProductTO to = <span class="keyword-directive">new</span> ProductTO();
<span class="line-number">168</span>         to.setProductId(productId);
<span class="line-number">169</span>         to.setDescription(description);
<span class="line-number">170</span>         to.setPurchaseCost(purchaseCost);
<span class="line-number">171</span>         to.setManufacturerName(<span class="keyword-directive">this</span>.manufacturer.getName());
<span class="line-number">172</span>         <span class="keyword-directive">return</span> to;
<span class="line-number">173</span>     }</pre>
<p>The TransferObject solves the first two problems, but leaves the issue of <a href="http://en.wikipedia.org/wiki/Latency_stage">latency</a>.  When you retrieve a Product list, you are also retrieving all the entities joined to it.  Even if you configured the entity with lazy loading, you would still load Manufacturer entity when you try to access the manufacturer name in your transfer method.  Imagine THAT scenario compounded with multiple joins and large datasets.</p>
<p><img src="http://img.ezinemark.com/imagemanager2/files/30002494/2010/07/2010-07-27-11-07-40-2-the-train-travels-from-india-to-pakistan.jpeg" alt="" /></p>
<p>Get the picture?</p>
<p>This is where some Java Persistence Query Language (JPQL) comes in handy.</p>
<blockquote><p><em>SELECT p.productId, p.description, p.purchaseCost, p.manufacturer.name FROM Product p</em></p></blockquote>
<p>Map this result set to your ProductTO and you solve your problems.</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;"><span class="line-number"><br />
258</span> <span class="keyword-directive">public</span> List&lt;ProductTO&gt; findProductCatalog() {</span></p>
<pre><span class="line-number">259</span>         EntityManager em = getEntityManager();
<span class="line-number">260</span>         List&lt;ProductTO&gt; productTOs = <span class="keyword-directive">new</span> ArrayList&lt;ProductTO&gt;();
<span class="line-number">261</span>         <span class="keyword-directive">try</span> {
<span class="line-number">262</span>             Query q = em.createQuery(<span class="character">"</span><span class="character">SELECT p.productId, p.description, p.purchaseCost, p.manufacturer.name FROM Product p</span><span class="character">"</span>);
<span class="line-number">263</span>             List&lt;Object[]&gt; products = (List&lt;Object[]&gt;)q.getResultList();
<span class="line-number">264</span>             <span class="keyword-directive">for</span> (Object[] objects : products) {
<span class="line-number">265</span>                 ProductTO to = <span class="keyword-directive">new</span> ProductTO();
<span class="line-number">266</span>                 to.setProductId((Integer) objects[0]);
<span class="line-number">267</span>                 to.setDescription((String) objects[1]);
<span class="line-number">268</span>                 to.setPurchaseCost((BigDecimal) objects[2]);
<span class="line-number">269</span>                 to.setManufacturerName((String) objects[3]);
<span class="line-number">270</span>                 productTOs.add(to);
<span class="line-number">271</span>             }
<span class="line-number">272</span>             <span class="keyword-directive">return</span> productTOs;
<span class="line-number">273</span>         }
<span class="line-number">274</span>         <span class="keyword-directive">finally</span> {
<span class="line-number">275</span>             em.close();
<span class="line-number">276</span>         }
<span class="line-number">277</span>     }</pre>
<p>Yes, I know this kind of defeats the purpose of automated ORM (Object Relational Mapping), but&#8230;</p>
<blockquote><p>RAJP – [raj-pee] Just one of the thousands of regular, average java programmers <strong>trying to get their job done…</strong></p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=187&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/15/performance-trap-using-jpa-transfer-object-pattern-and-jpql-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>

		<media:content url="http://t2.gstatic.com/images?q=tbn:3q_a1ALxeHB_-M:http://historyofeconomics.files.wordpress.com/2008/08/hall-of-mirrors.jpg&#38;t=1" medium="image" />

		<media:content url="http://t1.gstatic.com/images?q=tbn:ANd9GcQZ3_jc0mQlNm39f6pM8t3hpo7-iRyu0cj8P4uenZ_UMeX53iQ&#38;t=1&#38;usg=__Pz6iOFujA5QOMkdEF5GuFpf-EOU=" medium="image" />

		<media:content url="http://img.ezinemark.com/imagemanager2/files/30002494/2010/07/2010-07-27-11-07-40-2-the-train-travels-from-india-to-pakistan.jpeg" medium="image" />
	</item>
		<item>
		<title>Javaone 2010!!!</title>
		<link>http://davidwburns.wordpress.com/2010/09/13/javaone-2010/</link>
		<comments>http://davidwburns.wordpress.com/2010/09/13/javaone-2010/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 19:37:42 +0000</pubDate>
		<dc:creator>davidwburns</dc:creator>
				<category><![CDATA[Javaone 2010]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[javaone 2010]]></category>
		<category><![CDATA[oracleworld]]></category>

		<guid isPermaLink="false">http://davidwburns.wordpress.com/?p=178</guid>
		<description><![CDATA[Time to start blogging again.  My employer has cracked down on some of the blogging practices around here and I just didn&#8217;t want to be caught in that net.   I will be blogging my experience at Javaone/Oracle Develop this year from the perspective of a RAJP.  I&#8217;ll be travelling with a few other RAJPs <a href="http://davidwburns.wordpress.com/2010/09/13/javaone-2010/" class="excerpt-more-link">[&#8230;]</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=178&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Time to start blogging again.  My employer has cracked down on some of the blogging practices around here and I just didn&#8217;t want to be caught in that net.   I will be blogging my experience at Javaone/Oracle Develop this year from the perspective of a RAJP.  I&#8217;ll be travelling with a few other RAJPs and one not-so-average youngin.   When the last afternoon session is done, he&#8217;ll be the one who continues eating and crapping programming while we eat and crap the local pub food!   Mmmmmmmmmmm, fish n chips and bangers and mash at Foley&#8217;s!</p>
<p><img src="http://www.johnnyfoleys.com/images/exterior2.jpg" alt="Exterior Image #2" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidwburns.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidwburns.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidwburns.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidwburns.wordpress.com&amp;blog=2311869&amp;post=178&amp;subd=davidwburns&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidwburns.wordpress.com/2010/09/13/javaone-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9df8932d5520b25fc1c4eba535c3baef?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davidwburns</media:title>
		</media:content>

		<media:content url="http://www.johnnyfoleys.com/images/exterior2.jpg" medium="image">
			<media:title type="html">Exterior Image #2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
