<?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>Technology Nirvana</title>
	<atom:link href="http://jagadeeshm.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jagadeeshm.wordpress.com</link>
	<description>Technology + Experience + Fun + Tutorials + Reviews + [more coming up]</description>
	<lastBuildDate>Fri, 09 Apr 2010 11:58:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jagadeeshm.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Technology Nirvana</title>
		<link>http://jagadeeshm.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jagadeeshm.wordpress.com/osd.xml" title="Technology Nirvana" />
	<atom:link rel='hub' href='http://jagadeeshm.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Alphabets of Java</title>
		<link>http://jagadeeshm.wordpress.com/2010/01/05/alphabets-of-java/</link>
		<comments>http://jagadeeshm.wordpress.com/2010/01/05/alphabets-of-java/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 05:39:59 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=852</guid>
		<description><![CDATA[A &#8211; abstract / assert B &#8211; Boolean / boolean / byte / break C &#8211; char / case / class / catch D &#8211; do / default / double E &#8211; enum / extends F &#8211; final / finalize / finally / float / for G &#8211; goto H &#8211; hibernate I &#8211; Integer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=852&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A &#8211; abstract / assert</p>
<p>B &#8211; Boolean / boolean / byte / break</p>
<p>C &#8211; char / case / class / catch</p>
<p>D &#8211; do / default / double</p>
<p>E &#8211; enum / extends</p>
<p>F &#8211; final / finalize / finally / float / for</p>
<p>G &#8211; goto</p>
<p>H &#8211; hibernate</p>
<p>I &#8211; Integer / int / interface / instanceOf / import / implements / if</p>
<p>J &#8211; JAVA</p>
<p>K -</p>
<p>L &#8211; long / Long</p>
<p>M -</p>
<p>N &#8211; native</p>
<p>O &#8211; Object</p>
<p>P &#8211; public / private / protected</p>
<p>Q &#8211; queue</p>
<p>R &#8211; return</p>
<p>S &#8211; String / switch / synchronized</p>
<p>T &#8211; throw / throws / transient / try / this</p>
<p>U &#8211; UML</p>
<p>V &#8211; vector / volatile / void</p>
<p>W &#8211; while</p>
<p>X &#8211; ZML</p>
<p>Y -</p>
<p>Z -</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/852/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=852&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2010/01/05/alphabets-of-java/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>Horizontal and Vertical Freeze Panes in Microsoft Excel</title>
		<link>http://jagadeeshm.wordpress.com/2009/12/15/horizontal-and-vertical-freeze-panes-in-microsoft-excel/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/12/15/horizontal-and-vertical-freeze-panes-in-microsoft-excel/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 15:58:07 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Excel]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=844</guid>
		<description><![CDATA[Here is how you do it - Select the top-left cell that will not be part of the frozen panes Choose Window and Freeze Panes For example, to freeze the top three rows and the left three column, select cell D4 and perform step 2.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=844&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is how you do it -</p>
<ol>
<li>Select the top-left cell that will not be part of the frozen panes</li>
<li>Choose <strong>Window</strong> and <strong>Freeze Panes</strong>
<p>For example, to freeze the top three rows and the left three column, select cell D4 and perform step 2.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/844/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/844/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=844&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/12/15/horizontal-and-vertical-freeze-panes-in-microsoft-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>How to convert Drools Decision Table to Drools Rules file?</title>
		<link>http://jagadeeshm.wordpress.com/2009/12/11/how-to-convert-drools-decision-table-to-drools-rules-file/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/12/11/how-to-convert-drools-decision-table-to-drools-rules-file/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 22:10:25 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Drools]]></category>
		<category><![CDATA[JBoss]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=842</guid>
		<description><![CDATA[String DECISION_TABLE = &#8220;Your XLS filename that is in the classpath&#8221;; String str = DecisionTableFactory.loadFromInputStream(ResourceFactory.newClassPathResource(DECISION_TABLE).getInputStream(), dtconf); System.out.println(str);<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=842&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>String DECISION_TABLE = &#8220;Your XLS filename that is in the classpath&#8221;;</p>
<p>String str = DecisionTableFactory.loadFromInputStream(ResourceFactory.newClassPathResource(DECISION_TABLE).getInputStream(), dtconf);<br />
System.out.println(str);</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/842/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/842/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/842/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=842&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/12/11/how-to-convert-drools-decision-table-to-drools-rules-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>Book Review: Effective Java (Second Edition)</title>
		<link>http://jagadeeshm.wordpress.com/2009/10/03/book-review-effective-java-second-edition/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/10/03/book-review-effective-java-second-edition/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 18:08:32 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=821</guid>
		<description><![CDATA[Book Name Effective Java, Second Edition [The Java Series....from the Source] Author Joshua Bloch Where can I buy this book ? of course, Amazon &#8211; click here Is preview of the book available ? Yes, very limited preview from Amazon &#8211; click here Any online reviews? Click here for some online reviews from Amazon What [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=821&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Book Name</strong></p>
<p>Effective Java, Second Edition [The Java Series....from the Source]</p>
<p><strong>Author</strong></p>
<p>Joshua Bloch</p>
<p><strong>Where can I buy this book ?</strong></p>
<p>of course, Amazon &#8211; <a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683" target="_blank">click here</a></p>
<p><strong>Is preview of the book available ?</strong></p>
<p>Yes, very limited preview from Amazon &#8211; <a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683#reader" target="_blank">click here</a></p>
<p><strong>Any online reviews?</strong></p>
<p><a onclick="return mugicPopWin(this,event);" oncontextmenu="mugicRightClick(this);" href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/product-reviews/0321356683/ref=dp_top_cm_cr_acr_txt?ie=UTF8&amp;showViewpoints=1" target="_blank">Click here</a> for some online reviews from Amazon</p>
<p><strong>What is so interesting about the book?</strong></p>
<p>Everthing.</p>
<p>Here is what the inventor [James Gosling] says -</p>
<p>“I sure wish I had this book ten years ago. Some might think that I don’t need any Java books, but I need this one.” &#8211; James Gosling, fellow and vice president, Sun Microsystems, Inc., and inventor of the Java programming language.</p>
<p><strong>Finally, can search engines / web 2.0 websites help me find more contents of the book?</strong></p>
<p>You can try <a href="http://www.esnips.com/nsdoc/1727f1a9-c788-48e8-8b98-4d4a12ceefcb/?action=forceDL" target="_blank">esnips</a> and <a href="http://www.google.com/webhp?hl=en#hl=en&amp;source=hp&amp;q=effective+Java+%3Apdf&amp;btnG=Google+Search&amp;aq=f&amp;aqi=g10&amp;oq=&amp;fp=7d15299a959dbb33" target="_blank">Google</a>.</p>
<p>Enjoy reading the book!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/821/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/821/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/821/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=821&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/10/03/book-review-effective-java-second-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>FCKEditor: How to disable FCKEditor?</title>
		<link>http://jagadeeshm.wordpress.com/2009/10/03/fckeditor-how-to-disable-fckeditor/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/10/03/fckeditor-how-to-disable-fckeditor/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 15:02:36 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[FCKeditor]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=817</guid>
		<description><![CDATA[Have you ever had a problem with FCKEditor where you wanted to disable the editor but still have the scroll bars show up ? Here is a sample snippet that disables the editor based on a request variable and enables the scroll bar - &#60;% if(request.getSession().getAttribute(&#8220;isView&#8221;) != null &#38;&#38; &#8220;true&#8221;.equalsIgnoreCase(request.getSession().getAttribute(&#8220;isView&#8221;).toString())) {%&#62; if(oEditor != null &#38;&#38; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=817&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever had a problem with FCKEditor where you wanted to disable the editor but still have the scroll bars show up ?</p>
<p>Here is a sample snippet that disables the editor based on a request variable and enables the scroll bar -</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;height:243px;padding:5px;" border="0" width="871">
<tbody>
<tr>
<td>&lt;% if(request.getSession().getAttribute(&#8220;isView&#8221;) != null &amp;&amp; &#8220;true&#8221;.equalsIgnoreCase(request.getSession().getAttribute(&#8220;isView&#8221;).toString())) {%&gt;</p>
<p>if(oEditor != null &amp;&amp; oEditor.EditorDocument != null) {</p>
<p>editorInstance.EditorWindow.parent.document.getElementById(&#8220;xExpanded&#8221;).style.display = &#8220;none&#8221;;</p>
<p>editorInstance.EditorWindow.parent.document.getElementById(&#8220;xCollapsed&#8221;).style.display = &#8220;none&#8221;;</p>
<p>document.getElementById(editorInstance.Name + &#8220;___Frame&#8221;).contentWindow.document.getElementById(&#8216;xEditingArea&#8217;).getElementsByTagName(&#8216;iframe&#8217;)[0].contentWindow.document.getElementsByTagName(&#8216;body&#8217;)[0].contentEditable = &#8216;false&#8217;;</p>
<p>}</p>
<p>&lt;% } %&gt;</td>
</tr>
</tbody>
</table>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/817/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/817/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/817/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=817&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/10/03/fckeditor-how-to-disable-fckeditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>Java: Difference between Comparable and Comparator Interface</title>
		<link>http://jagadeeshm.wordpress.com/2009/09/26/java-difference-between-comparable-and-comparator-interface/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/09/26/java-difference-between-comparable-and-comparator-interface/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 14:33:36 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=803</guid>
		<description><![CDATA[Java allows us to sort objects that implement the Collection Interface, using either the comparable interface or a comparator class. But do you know what the differences using each of the Interface ? java.lang.Comparable java.util.Comparator int objOne.compareTO(objTwo) &#8211; A Comparable interfaced class must contain a method called compareTo to compare two objects (one being the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=803&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Java allows us to sort objects that implement the Collection Interface, using either the comparable interface or a comparator class. But do you know what the differences using each of the Interface ?</p>
<table style="height:394px;" border="1" cellspacing="0" cellpadding="5" width="856">
<tbody>
<tr>
<td width="50%" bgcolor="#999999">
<p style="text-align:center;"><strong>java.lang.Comparable</strong></p>
</td>
<td width="50%" bgcolor="#999999">
<div style="text-align:center;"><strong>java.util.Comparator</strong></div>
</td>
</tr>
<tr>
<td>int objOne.compareTO(objTwo) &#8211; A <strong>Comparable</strong> interfaced class must contain a method called <strong>compareTo</strong> to compare two objects (one being the object on which it is called and the other being passed as a paramater)</td>
<td>int compare(objOne, objTwo) &#8211; A <strong>Comparator</strong> is a class in its own right, which implements the Comparator interface; that means it must contain a method called <strong>compare</strong> (two objects as parameters)</td>
</tr>
<tr>
<td>Return Values -</p>
<p style="padding-left:30px;">negative &#8211; if objOne &lt; objTwo</p>
<p style="padding-left:30px;">zero &#8211; if objOne = objTwo</p>
<p style="padding-left:30px;">positive &#8211; if objOne &gt; objTwo</p>
</td>
<td>Return Value -</p>
<p>same as Comparable</td>
</tr>
<tr>
<td>Only one sort sequence can be created</td>
<td>Many sort sequences can be created</td>
</tr>
<tr>
<td>You must modify the class whose instances you want to sort</td>
<td>You build a separate class from the class whose instances you want to sort</td>
</tr>
<tr>
<td>Implemented frequently in the API by : String, Wrapper Classes, Date, Calendar</td>
<td>Meant to be implemented to sort instances of third-party classes</td>
</tr>
<tr>
<td>If you want to sort a collection using its comparable interface, you simply call the static <strong>Collections.sort</strong> method on it &#8230; so if we had an ArrayList called Animal which implemented Comparable, we could write:<br />
<code>Collections.sort(Animal);</code></td>
<td>To sort a collection using a Comparator class, you need to pass an extra parameter into the <strong>Collections.sort</strong>method &#8211; that parameter being an instance of a Comparator object. Thus:<br />
<code>Collections.sort(Animal, new ByBreed());</code></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/803/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/803/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/803/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=803&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/09/26/java-difference-between-comparable-and-comparator-interface/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery: Setting default submit button for &#8216;Enter Key&#8217; using jQuery</title>
		<link>http://jagadeeshm.wordpress.com/2009/09/15/jquery-setting-default-submit-button-for-enter-key-using-jquery/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/09/15/jquery-setting-default-submit-button-for-enter-key-using-jquery/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 20:35:45 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=779</guid>
		<description><![CDATA[To Start with&#8230; One of the most annoying things in developing web pages is handling the &#8220;Enter Key&#8221; for form submission. &#8216;Enter Key&#8217; makes form submission so easy that users always tend to use it. The easiest and the most intuitive way is that, the user can enter some text or make some changes to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=779&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>To Start with&#8230;</strong></p>
<p>One of the most annoying things in developing web pages is handling the &#8220;Enter Key&#8221; for form submission. &#8216;Enter Key&#8217; makes form submission so easy that users always tend to use it. The easiest and the most intuitive way is that, the user can enter some text or make some changes to the existing text and then hit &#8220;Enter Key&#8221; to submit the form.</p>
<p><strong>Wait a minute&#8230;.so is there a problem here ?</strong></p>
<p>Yes, ofcourse !</p>
<p><strong>And what is it ?</strong></p>
<p>There are 2 cases.</p>
<p><strong>Case 1</strong> -Form with multiple fields and single submit button</p>
<p><strong>Case 2</strong> &#8211; Form with multiple fields and multiple submit buttons. Lets say &#8211; Delete, Update / Save, Cancel etc.</p>
<p>In general, Case 1 is very straight forward and you should not be having any issues because there is only one button and when you press &#8216;Enter Key&#8217;, that single button will get the focus and will submit the form.</p>
<p>But in Case 2, since there is more than one submit button, when you press &#8216;Enter Key&#8217;, in most cases the browser will either pick the button that comes first in the source code [IE] or depending on the lowest tab index [Firefox &amp; Opera].</p>
<p><strong>oh&#8230;Gotchu</strong>!</p>
<p>Good.</p>
<p><strong>Do we have a Solution?</strong></p>
<p>Sure.<strong> </strong>There are several ways to resolve this issue. But if you are looking for an Enterprise Wide Solution you can probably start with the below code.</p>
<p>I am using simple jQuery and HTML form events</p>
<p><strong>Code</strong></p>
<p>Consider the following HTML page with multiple submit buttons -</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form id="form1" name="testForm" method="post" action=""&gt;
 &lt;table  border="1" cellpadding="5"&gt;
 &lt;tr&gt;
     &lt;td&gt;First Name: &lt;/td&gt;
     &lt;td&gt;&lt;label&gt;&lt;input type="text" name="textfield3" /&gt;&lt;/label&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
     &lt;td&gt;Last Name &lt;/td&gt;
     &lt;td&gt;&lt;label&gt; &lt;input type="text" name="textfield4" /&gt;&lt;/label&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
 &lt;div&gt;
     &lt;input type="submit" name="CancelButton" value="Cancel" /&gt;
     &lt;input type="submit" name="DeleteButton" value="Delete" /&gt;
     &lt;input type="submit" name="UpdateButton" value="Update" /&gt;
 &lt;/div&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p>Now if you have your focus on one of the HTML form fields &#8211; First Name or Last Name and hit &#8216;Enter Key&#8217;, form will be submitted to one of the button actions but you are not sure which ones!</p>
<p>Now let us say you wanted to default the form submission always to &#8220;Update&#8221; button, you need to do the following &#8211; <strong> </strong></p>
<p>1. <strong>Assign an ID to Update button</strong></p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>&lt;input type=&#8221;submit&#8221; name=&#8221;UpdateButton&#8221; value=&#8221;Update&#8221; id=&#8221;defaultActionButton&#8221;&gt;</td>
</tr>
</tbody>
</table>
<p>2. <strong>Capture onKeyDown event for textboxes and submit the form to &#8220;Update&#8221; button / action. [this is where I use jQuery]</strong></p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre>// all jQuery events are executed within the document ready function
$(document).ready(function() {

   $("input").bind("keydown", function(event) {
      // track enter key
      var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));
      if (keycode == 13) { // keycode for enter key
         // force the 'Enter Key' to implicitly click the Update button
         document.getElementById('defaultActionButton').click();
         return false;
      } else  {
         return true;
      }
   }); // end of function

}); // end of document ready</pre>
</td>
</tr>
</tbody>
</table>
<p>The above snippet will handle&#8217;Enter Key&#8217; events from textbox, checkbox and radio button. You can write similar code to enhance the functionality to dropdowns as well.</p>
<p>Hope that helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/779/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/779/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/779/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=779&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/09/15/jquery-setting-default-submit-button-for-enter-key-using-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery: Flexibility of combining multiple statements</title>
		<link>http://jagadeeshm.wordpress.com/2009/09/15/jquery-flexibility-of-combining-multiple-statements/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/09/15/jquery-flexibility-of-combining-multiple-statements/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:04:15 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=771</guid>
		<description><![CDATA[The true essence of jQuery [write less do more] lies in its flexibility to combine multiple statements into one. Scenario - HTML &#60;input type="text" name="addrLine1" maxlength="100" size="40" value="" id="addrLine1" &#62; CCS input.disabled { /* Structure: */ /* Format: */ background-color:#e5e5e5;color:#999 } Now you wanted to do two things - disable the textbox change the style [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=771&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The true essence of jQuery [write less do more] lies in its flexibility to combine multiple statements into one.</p>
<p>Scenario -</p>
<p><strong>HTML</strong></p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;height:35px;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;input type="text" name="addrLine1" maxlength="100" size="40" value="" id="addrLine1" &gt;</pre>
</td>
</tr>
</tbody>
</table>
<p><strong>CCS</strong></p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre><strong></strong>input.disabled {
 /* Structure: */
 /*    Format: */ background-color:#e5e5e5;color:#999
}</pre>
</td>
</tr>
</tbody>
</table>
<p>Now you wanted to do two things -</p>
<ol>
<li>disable the textbox</li>
<li>change the style class of textbox to <em>disabled</em>.</li>
</ol>
<p>Using Traditional Javascript,</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre>document.getElementById("addrLine1").disabled = true ;
document.getElementById("addrLine1").className= "disabled" ;</pre>
</td>
</tr>
</tbody>
</table>
<p>jQuery provides the flexibility of combining statements and you can achieve the above using the following code</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<pre><strong>$("#addrLine1").attr("disabled", "disabled").addClass('disabled');</strong></pre>
</td>
</tr>
</tbody>
</table>
<p>You can quote 100&#8242;s of such examples.</p>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/771/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/771/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=771&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/09/15/jquery-flexibility-of-combining-multiple-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
		<item>
		<title>J2EE: Which JVM served my request?</title>
		<link>http://jagadeeshm.wordpress.com/2009/09/04/j2ee-which-jvm-served-my-request/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/09/04/j2ee-which-jvm-served-my-request/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 04:37:07 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=744</guid>
		<description><![CDATA[In general, enterprise web application are deployed in multiple JVMs to attain the power of distributed computing. At times, you might want to find out which JVM served your request for various reasons - - Debugging an error [example - checking system.outs or logger files] - Caching issues I use one of the following simple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=744&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In general, enterprise web application are deployed in multiple JVMs to attain the power of distributed computing. At times, you might want to find out which JVM served your request for various reasons -</p>
<p>- Debugging an error [example - checking system.outs or logger files]</p>
<p>- Caching issues</p>
<p>I use one of the following simple techniques to find out which JVM served my request [I am using WAS 6 as an example]-</p>
<p><strong>Steps &#8211; 1</strong></p>
<p>Create a Custom Property in the each Application Server JVM where your web application is deployed. For example, give the property name as &#8220;CLONEID&#8221; and specify a meaningful value so that you can recognize the JVM</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-745" style="border:5px solid #e5eecc;" title="WAS 01" src="http://jagadeeshm.files.wordpress.com/2009/09/was-01.jpg?w=550&#038;h=250" alt="WAS 01" width="550" height="250" /></p>
<p><strong>Step &#8211; 2</strong></p>
<p>In your jsp add the following code snippet</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<div class="code">&lt;!&#8211;<br />
&lt;%<br />
String cloneID = System.getProperty(&#8220;CLONEID&#8221;);<br />
out.print(java.net.InetAddress.getLocalHost().getHostName());<br />
out.println(&#8221; : &#8220;+(cloneID==null?&#8221;N/A&#8221;:cloneID));<br />
%&gt;<br />
&#8211;&gt;</div>
</td>
</tr>
</tbody>
</table>
<p>Finally,</p>
<p>If you want to check which JVM served your jsp, simply right click on the web page and click view source. You will be noticing that the JVM details appear on the page as follows&#8230;</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-752" style="border:5px solid #e5eecc;" title="WAS 02" src="http://jagadeeshm.files.wordpress.com/2009/09/was-02.jpg?w=544&#038;h=271" alt="WAS 02" width="544" height="271" /></p>
<p>Note: The reason I have both getHostName() and CloneID is just avoid any confusion &#8211; custom property vs api returned host name.</p>
<p>I am pretty sure there are other ways but this one of the very quick and dirty way.</p>
<p>Happy coding!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/744/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=744&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/09/04/j2ee-which-jvm-served-my-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>

		<media:content url="http://jagadeeshm.files.wordpress.com/2009/09/was-01.jpg" medium="image">
			<media:title type="html">WAS 01</media:title>
		</media:content>

		<media:content url="http://jagadeeshm.files.wordpress.com/2009/09/was-02.jpg" medium="image">
			<media:title type="html">WAS 02</media:title>
		</media:content>
	</item>
		<item>
		<title>Database Concepts for Java Programmer: Part 2 &#8211; Keys</title>
		<link>http://jagadeeshm.wordpress.com/2009/09/03/database-concepts-for-java-programmer-part-2-keys/</link>
		<comments>http://jagadeeshm.wordpress.com/2009/09/03/database-concepts-for-java-programmer-part-2-keys/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 17:21:39 +0000</pubDate>
		<dc:creator>Jagadeesh</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://jagadeeshm.wordpress.com/?p=679</guid>
		<description><![CDATA[In this part, I will be briefing about different kind of keys available in database systems. Base example I will be using the following table to explain about database keys - EMPLOYEE [ EMPLOYEE_ID, EMPLOYEE_SSN_ID, EMPLOYEE_DEPT_ID, EMPLOYEE_FIRST_NAME, EMPLOYEE_LAST_NAME, EMPLOYEE_ADDRESS ] Candidate Key A candidate key is a combination of attributes that can be uniquely used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=679&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">In this part, I will be briefing about different kind of keys available in database systems.</p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td><strong>Base example </strong>I will be using the following table to explain about database keys -</p>
<p><strong>EMPLOYEE </strong>[ EMPLOYEE_ID, EMPLOYEE_SSN_ID, EMPLOYEE_DEPT_ID, EMPLOYEE_FIRST_NAME, EMPLOYEE_LAST_NAME, EMPLOYEE_ADDRESS ]</td>
</tr>
</tbody>
</table>
<hr />
<p style="text-align:justify;"><strong>Candidate Key</strong></p>
<p style="text-align:justify;"><strong> </strong>A candidate key is a combination of attributes that can be uniquely used to identify a database record without any extraneous data. Each table may have one or more candidate keys. In general, one of these candidate keys is selected as the table primary key.</p>
<p style="text-align:justify;">Example &#8211; From the above table EMPLOYEE_ID, EMPLOYEE_SSN_ID, and EMPLOYEE_DEPT_ID can be considered as candidate keys</p>
<hr />
<p style="text-align:justify;"><strong>Primary Key</strong></p>
<p style="text-align:justify;">A primary key <strong> </strong> is a single column or combination of columns that uniquely defines a record. None of the columns that are part of the primary key can contain a null value. A table can have only one primary key.</p>
<p style="text-align:justify;">Example &#8211; EMPLOYEE_ID or EMPLOYEE_SSN_ID can be considered as primary keys</p>
<hr />
<p style="text-align:justify;"><strong>Unique Key</strong></p>
<p style="text-align:justify;">A unique key or primary key [is a candidate key] to uniquely identify each row in a table. It be comprised of either a single column or multiple columns.</p>
<p style="text-align:justify;">The major difference is that for unique keys the implicit <code>NOT NULL</code> constraint is not automatically enforced, while for primary keys it is enforced. Thus, the values in unique key columns may or may not be NULL.</p>
<hr />
<p style="text-align:justify;"><strong>Differences between Primary Key and Unique Key</strong></p>
<table style="border:1px solid #d4d4d4;color:#000000;background-color:#e5eecc;text-align:justify;padding:5px;" border="0" width="100%">
<tbody>
<tr>
<td>
<div style="text-align:center;"><strong>Primary Keys</strong></div>
</td>
<td>
<div style="text-align:center;"><strong>Unique Keys</strong></div>
</td>
</tr>
<tr>
<td valign="top">1. It will not accept null values.</td>
<td valign="top">1. Null values are accepted.</td>
</tr>
<tr>
<td valign="top">2. There will be only one primary key in a table.</td>
<td valign="top">2. More than one unique key will be there in a table.</td>
</tr>
<tr>
<td valign="top">3. Clustered index is created in Primary key.</td>
<td valign="top">3. Non-Clustered index is created in unique key.</td>
</tr>
<tr>
<td valign="top">4. Primary key allows each row in a table to be uniquely identified and ensures that no duplicate rows exist.</td>
<td valign="top">4. Unique key constraint is used to prevent the duplication of key values within the rows of a table and allow null values.</td>
</tr>
</tbody>
</table>
<hr />
<p style="text-align:justify;"><strong>Alternate Key</strong></p>
<p style="text-align:justify;"><span style="font-family:Arial;color:black;">A candidate key that is not the primary key is called an alternate key.</span></p>
<p style="text-align:justify;"><span style="font-family:Arial;color:black;">Example &#8211; If </span>EMPLOYEE_ID is considered as primary keys then EMPLOYEE_SSN_ID is an alternate key. <span style="font-family:Arial;color:black;"><br />
</span></p>
<hr />
<p style="text-align:justify;"><strong>Superkey</strong></p>
<p style="text-align:justify;">A superkey is a combination of attributes that can be uniquely used to identify a database record. A table might have many superkeys. Candidate keys are a special subset of superkeys that do not have any extraneous information in them.</p>
<p style="text-align:justify;"><span style="font-family:Arial;color:black;">A primary key is therefore a minimum superkey.</span></p>
<p style="text-align:justify;"><span style="font-family:Arial;color:black;">Examples &#8211; Any combination of the following can be considered as a Super key </span></p>
<p style="text-align:justify;">- EMPLOYEE_ID &#8211; Minimal Super Key</p>
<p style="text-align:justify;">- EMPLOYEE_ID and EMPLOYEE_SSN_ID</p>
<p style="text-align:justify;">- EMPLOYEE_ID, EMPLOYEE_SSN_ID and EMPLOYEE_DEPT_ID</p>
<p style="text-align:justify;">- EMPLOYEE_ID, EMPLOYEE_SSN_ID, EMPLOYEE_DEPT_ID, EMPLOYEE_FIRST_NAME</p>
<p style="text-align:justify;">- EMPLOYEE_SSN_ID, EMPLOYEE_FIRST_NAME, EMPLOYEE_LAST_NAME</p>
<hr />
<p style="text-align:justify;"><strong>Foreign Key</strong></p>
<p style="text-align:justify;">The foreign key identifies a column or a set of columns in one (referencing) table that refers to a column or set of columns in another (referenced) table.</p>
<hr />
<p style="text-align:justify;"><strong>Composite Key</strong></p>
<p style="text-align:justify;">A primary key that made up of more than one attribute is              known as a composite key.</p>
<p style="text-align:justify;">Example &#8211; [ EMPLOYEE_ID and EMPLOYEE_SSN_ID ] can together be treated as (one of) composite keys. Another combination can be [ EMPLOYEE_ID, EMPLOYEE_SSN_ID and EMPLOYEE_DEPT_ID ]</p>
<hr />
<p style="text-align:justify;"><strong>Surrogate Key</strong></p>
<p style="text-align:justify;">Surrogate keys are keys that have no “business” meaning and are solely used to identify a record in the table.<span> </span></p>
<p style="text-align:justify;"><span> </span>Such keys are either database generated (example: Identity in SQL Server, Sequence in Oracle, Sequence/Identity in DB2 UDB etc.) or system generated values (like generated via a table in the schema).</p>
<hr /><strong>Further Reading:</strong></p>
<p>Part 1 &#8211; <a href="http://jagadeeshm.wordpress.com/2009/08/22/database-contepts-for-java-programmer-part-1-acid-properties/" target="_blank">ACID Properties</a></p>
<p>Part 3 – Data Transactions [coming soon]</p>
<p>Part 4 – Normalization [coming soon]</p>
<p>Part 5 – Indexes [coming soon]</p>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>References</strong></p>
<p style="text-align:justify;">http://en.wikipedia.org</p>
<p style="text-align:justify;">http://databases.about.com</p>
<p style="text-align:justify;">http://www.oracle.com</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jagadeeshm.wordpress.com/679/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jagadeeshm.wordpress.com/679/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jagadeeshm.wordpress.com/679/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagadeeshm.wordpress.com&amp;blog=7461117&amp;post=679&amp;subd=jagadeeshm&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagadeeshm.wordpress.com/2009/09/03/database-concepts-for-java-programmer-part-2-keys/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9887eda87c58d73577c41f845a7347f2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagadeeshm</media:title>
		</media:content>
	</item>
	</channel>
</rss>
