<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Veera Sundar - Java, Web and Design</title>
	
	<link>http://veerasundar.com/blog</link>
	<description />
	<lastBuildDate>Sun, 07 Feb 2010 16:33:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/veerasundar/dreamz" /><feedburner:info uri="veerasundar/dreamz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><feedburner:emailServiceId>veerasundar/dreamz</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Switching to Thesis wordpress theme</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/x5DIdiOqYkQ/</link>
		<comments>http://veerasundar.com/blog/2010/02/switching-to-thesis-wordpress-theme/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 08:20:15 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thesis]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1339</guid>
		<description><![CDATA[Hello there! If you are reading this entry from a feed reader, please take a moment to visit my blog. Because the news is I changed my blog theme to Thesis 1.6 and want you to have a look at it.
For the folks who were following my blog in the last one year, the theme [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Hello there! If you are reading this entry from a feed reader, please take a moment to <a href="http://veerasundar.com/blog">visit my blog</a>. Because the news is I changed my blog theme to <a title="Thesis Theme for WordPress" href="http://diythemes.com/thesis/">Thesis 1.6</a> and want you to have a look at it.</p>
<p>For the folks who were following my blog in the last one year, the theme change is not a big deal to them. Because, I often change my blog theme and advertise it in my blog (do a quick search on <a href="http://www.google.co.in/#hl=en&amp;source=hp&amp;q=theme+site%3Aveerasundar.com&amp;btnG=Google+Search&amp;meta=&amp;aq=f&amp;oq=theme+site%3Aveerasundar.com">theme</a> and you&#8217;ll know!). But, for the last few months, I tried my best to not to change the theme again and again. I was successfull in that to some extend. I was using the <em>self-made</em> theme, with a blue background for more than 2 months.</p>
<p>I remembered all the feedback that came from my good readers regarding the previous theme changes. So when I chose to switch to Thesis, I told myself not to drastically alter the site layout. Instead, keep the layout and look-and-feel as much intact as possible and apply the Thesis theme over it. I guess I kept my promise there.</p>
<p>So, it is now time for you to voice your thoughts on this theme change. Well, not only theme change, if you expect any other feature that you want but missing in this blog, you can tell that too.</p>
<p>And, thank you for reading my blog!</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1339&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/09/introducing-the-new-theme-for-my-blog/" title="Introducing the new theme for my blog">Introducing the new theme for my blog</a></li><li><a href="http://veerasundar.com/blog/2008/11/somebody-stop-me/" title="Somebody stop me!!">Somebody stop me!!</a></li><li><a href="http://veerasundar.com/blog/2008/10/changed-the-blog-theme-again/" title="Changed the blog theme, again!">Changed the blog theme, again!</a></li><li><a href="http://veerasundar.com/blog/2009/12/so-long-2009-welcome-2010/" title="So long 2009, Welcome 2010!">So long 2009, Welcome 2010!</a></li><li><a href="http://veerasundar.com/blog/2009/10/html-id-or-class-which-one-should-i-use/" title="HTML ID or Class &#8211; Which one should I use?">HTML ID or Class &#8211; Which one should I use?</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=x5DIdiOqYkQ:9mdZywAzL-s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=x5DIdiOqYkQ:9mdZywAzL-s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=x5DIdiOqYkQ:9mdZywAzL-s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=x5DIdiOqYkQ:9mdZywAzL-s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=x5DIdiOqYkQ:9mdZywAzL-s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=x5DIdiOqYkQ:9mdZywAzL-s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=x5DIdiOqYkQ:9mdZywAzL-s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=x5DIdiOqYkQ:9mdZywAzL-s:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/x5DIdiOqYkQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/02/switching-to-thesis-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/02/switching-to-thesis-wordpress-theme/</feedburner:origLink></item>
		<item>
		<title>5 Ways of effectively using Firebug to edit HTML, CSS</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/dqqw4DuS3mU/</link>
		<comments>http://veerasundar.com/blog/2010/02/5-ways-of-effectively-using-firebug-to-edit-html-css/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 07:36:09 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1298</guid>
		<description><![CDATA[Firebug is an inseperable tool in any Web developer&#8217;s toolbox. It&#8217;s one of the best things that happened to JavaScript and Web Development. I have been using Firebug for a long time and have been wondering how my web development would be if there is no Firebug. So, in this article, I&#8217;m sharing few of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Firebug is an inseperable tool in any Web developer&#8217;s toolbox. It&#8217;s one of the best things that happened to JavaScript and Web Development. I have been using Firebug for a long time and have been wondering how my web development would be if there is no Firebug. So, in this article, I&#8217;m sharing few of my tips and tricks to use Firebug effectively to speed up your web development.</p>
<h2>1. Visually modifying page layout in Firebug</h2>
<p>Firebug&#8217;s <em>Layout </em>panel let&#8217;s you to examine the selected element&#8217;s height, width and other position related attributes in a visual manner. Apart from showing the positional attribute values, the <em>Layout </em>panel allows you to edit the values directly from the panel. To edit a value, just click on it and the modified value will be reflected immediately on the page.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1305" title="Visually modifying page layout using Firebug" src="http://veerasundar.com/blog/wp-content/uploads/2010/02/firebug_layout.png" alt="Visually modifying page layout using Firebug" width="294" height="223" /></p>
<h2>2. See the computed styles for an element</h2>
<p>As you might have known, CSS apply styles in a cascading manner (after all, it is <em>cascading</em> style sheet, isn&#8217;t it?). I.e. The styles that are defined for the parent element will be applied to all of it&#8217;s child elements too. But, the child element is allowed to override any of the parent styles and define its own styles. Thus, the final set of style attributes which are applied to an element is always changed at the run time. To view the final style attributes, which are calculated after applying all the inherited style definitions, are displayed in the <em>Computed</em> panel. Please note that it is not possible to edit any attribute from this panel.</p>
<p><img class="aligncenter size-full wp-image-1306" title="See the computed styles for an element" src="http://veerasundar.com/blog/wp-content/uploads/2010/02/firebug_computed.png" alt="See the computed styles for an element" width="334" height="231" /></p>
<h2>3. Find out which CSS file is the black sheep</h2>
<p>Some times it becomes very difficult to figure out which CSS definition is affecting a element style. When more than one CSS files are being used in a single page, then it becomes even more difficult. In such scenarios, Firebug could be used to identify the CSS file name from which an CSS style definition is being taken. For example, in the below screenshot you can see that the particular page uses two CSS files (<em>screen.css</em> and <em>reset.css</em>) and the <em>Style</em> panel clearly displays which style is taken from which CSS file. The overridden styles are striked out. The <em>Style</em> panel also links to the URL of the style file being used, so it is easy for us to get the entire CSS file if needed.</p>
<p><img class="aligncenter size-full wp-image-1308" title="Find out which CSS file is the black sheep" src="http://veerasundar.com/blog/wp-content/uploads/2010/02/firebug_multi_styles.png" alt="Find out which CSS file is the black sheep" width="537" height="282" /></p>
<h2>4. Not just edit CSS, edit HTML too</h2>
<p>Firebug <em>Style</em> panel lets you to edit any CSS attribute and view the results immediately. Firebug can be used to edit the HTML content also. To do it, right click on the tag which you want to edit in the <em>HTML</em> panel and then select <code>Edit HTML</code> (or, just double click on the element). Firebug opens the inner HTML of the element you selected in edit mode. The changes you make will be visible on the page immediately.</p>
<p><img class="aligncenter size-full wp-image-1309" title="Not just edit CSS, edit HTML too" src="http://veerasundar.com/blog/wp-content/uploads/2010/02/firebug_edit-e1265179743540.png" alt="Not just edit CSS, edit HTML too" width="394" height="105" /></p>
<h2>5. Jump to the element you are editing</h2>
<p>This is a nifty option for quickly navigating to the element that you are currently working. While editing a HTML element, right from the <em>HTML</em> panel, you can easily bring that element into view by right clicking and selecting <em>Scroll into view</em>.</p>
<p><img class="aligncenter size-full wp-image-1310" title="Jump to the element you are editing" src="http://veerasundar.com/blog/wp-content/uploads/2010/02/firebug_scroll_view-e1265179923269.png" alt="Jump to the element you are editing" width="376" height="361" /></p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1298&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/07/downloadable-fonts-in-firefox-35/" title="Downloadable fonts in Firefox 3.5">Downloadable fonts in Firefox 3.5</a></li><li><a href="http://veerasundar.com/blog/2009/02/timelinr-a-web-20-application-for-creating-timelines-online/" title="Timelinr &#8211; A web 2.0 application for creating timelines online">Timelinr &#8211; A web 2.0 application for creating timelines online</a></li><li><a href="http://veerasundar.com/blog/2008/12/i-am-a-java-developer-should-i-know-about-div/" title="I am a Java developer. Should I know about DIV ?">I am a Java developer. Should I know about DIV ?</a></li><li><a href="http://veerasundar.com/blog/2008/08/how-to-create-a-horizontal-navigation-website-using-jquery/" title="How to create a horizontal navigation website using JQuery.">How to create a horizontal navigation website using JQuery.</a></li><li><a href="http://veerasundar.com/blog/2009/06/google-page-speed-firefox-plugin-for-improving-website-performance/" title="Google Page Speed &#8211; Firefox plugin for improving website performance">Google Page Speed &#8211; Firefox plugin for improving website performance</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=dqqw4DuS3mU:HXlHntKszuU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=dqqw4DuS3mU:HXlHntKszuU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=dqqw4DuS3mU:HXlHntKszuU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=dqqw4DuS3mU:HXlHntKszuU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=dqqw4DuS3mU:HXlHntKszuU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=dqqw4DuS3mU:HXlHntKszuU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=dqqw4DuS3mU:HXlHntKszuU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=dqqw4DuS3mU:HXlHntKszuU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/dqqw4DuS3mU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/02/5-ways-of-effectively-using-firebug-to-edit-html-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/02/5-ways-of-effectively-using-firebug-to-edit-html-css/</feedburner:origLink></item>
		<item>
		<title>Building a desktop PC for RS 20K</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/JoypbrJp8z4/</link>
		<comments>http://veerasundar.com/blog/2010/02/building-a-desktop-pc-for-rs-20k/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 12:59:17 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[assembling]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[pc]]></category>
		<category><![CDATA[pc-building]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1287</guid>
		<description><![CDATA[I&#8217;m planning to build a desktop PC for myself. I do not want to go for a branded systems, like Dell or Compaq, for two reasons &#8211; one: they come with the bundled Windows; two: there is no AMD powred system. There is one more important reason &#8211; that the cost should come around RS [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;m planning to build a desktop PC for myself. I do not want to go for a branded systems, like Dell or Compaq, for two reasons &#8211; one: they come with the bundled Windows; two: there is no AMD powred system. There is one more important reason &#8211; that the cost should come around <strong>RS 20,000</strong>.</p>
<p>I&#8217;m not building this system for Gaming (but, I might occasionally play FIFA). So the focus here is not on the <em>beauty outside</em>, but the <em>beast inside</em>. Here&#8217;s what my current configuration looks like:</p>
<div style="border:1px solid #EEE; background-color:#FAFAFA;width:500px;padding:5px;">
<span style="float:left;"><b>Processor</b> &#8211; AMD Athlon X2 &#8211; 2.8GHz, 2MB, AM3 &#8211; 64 Bit</span><span style="float:right;font-weight:bold;">2900</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Motherboard</b> &#8211; Asus	AMD 740G &#8211; M2A74-AM</span><span style="float:right;font-weight:bold;">2850</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Memory</b> &#8211; Kingston 4 GB</span><span style="float:right;font-weight:bold;">4000</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Hard disk</b> &#8211; Seagate 160 GB </span><span style="float:right;font-weight:bold;">1850</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Monitor</b> &#8211; Acer 17&#8221; LCD</span><span style="float:right;font-weight:bold;">5800</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Optical Drive</b> &#8211; LG DVD Writer</span><span style="float:right;font-weight:bold;">1100</span><br />
<span style="clear:both;"></span><br />
<span style="float:left;"><b>Cabinet + Keyboard + Mouse</b> &#8211; Any </span><span style="float:right;font-weight:bold;">1500</span><br />
<span style="clear:both;"></span><br />
<span style="float:right;border-top:2px solid #000;border-bottom:2px solid #000;font-weight:bold;font-size:14px;padding:4px;">20,000</span><br />
<span style="clear:both;"></span><br />
<span style="font-size:11px;float:right;font-style:italic;">* All the prices are based on <a href="http://www.deltapage.com/">Deltapage</a></span><br />
<span style="clear:both;"></span>
</div>
<p>If you have been using any of the above mentioned items, please feel free to give a review on the same. Also, if you have any other better configuration in mind, do leave a comment, will update my wish list based on that.</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1287&type=feed" alt="" /><h2  class="related_post_title">Most Popular Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/07/log4j-tutorial-adding-log4j-logging-to-your-project/" title="Log4j Tutorial : Adding Log4j logging to your project">Log4j Tutorial : Adding Log4j logging to your project</a></li><li><a href="http://veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/" title="How to change the &#8216;root&#8217; password for MySQL in XAMPP?">How to change the &#8216;root&#8217; password for MySQL in XAMPP?</a></li><li><a href="http://veerasundar.com/blog/2009/11/15-creative-java-applications-based-on-netbeans-platform/" title="15+ Creative Java applications based on Netbeans Platform">15+ Creative Java applications based on Netbeans Platform</a></li><li><a href="http://veerasundar.com/blog/2009/07/closing-the-last-tab-in-firefox-35/" title="Closing the last tab in Firefox 3.5">Closing the last tab in Firefox 3.5</a></li><li><a href="http://veerasundar.com/blog/2009/08/log4j-tutorial-additivity-what-and-why/" title="Log4j Tutorial: Additivity &#8211; what and why?">Log4j Tutorial: Additivity &#8211; what and why?</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=JoypbrJp8z4:tAeKKk6Y52o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=JoypbrJp8z4:tAeKKk6Y52o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=JoypbrJp8z4:tAeKKk6Y52o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=JoypbrJp8z4:tAeKKk6Y52o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=JoypbrJp8z4:tAeKKk6Y52o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=JoypbrJp8z4:tAeKKk6Y52o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=JoypbrJp8z4:tAeKKk6Y52o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=JoypbrJp8z4:tAeKKk6Y52o:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/JoypbrJp8z4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/02/building-a-desktop-pc-for-rs-20k/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/02/building-a-desktop-pc-for-rs-20k/</feedburner:origLink></item>
		<item>
		<title>What does Oracle plan for Netbeans IDE?</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/6Ae_ry1eaMM/</link>
		<comments>http://veerasundar.com/blog/2010/01/what-does-oracle-plan-for-netbeans-ide/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 06:47:11 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[acquisition]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[jdeveloper]]></category>
		<category><![CDATA[merger]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1275</guid>
		<description><![CDATA[This might interest any Java developer who uses Netbeans IDE from Sun. The Oracle + Sun merger does not raise the question of &#8216;what will happen to MySQL?&#8217; alone. Because, along with the flagship database product, Oracle also has JDeveloper which conflicts with Netbeans IDE. Both software are used for Java development, but it seems [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This might interest any Java developer who uses <a title="The only IDE you need! Runs on Windows, Linux, Mac OS X and Solaris. NetBeans IDE is open-source and free. " href="http://netbeans.org/">Netbeans IDE</a> from Sun. The <a title="Oracle Corporation (NASDAQ: ORCL) announced today that it had completed its acquisition of Sun Microsystems, Inc. Combination of the local entities worldwide will proceed in accordance with local laws." href="http://www.oracle.com/us/corporate/press/044428">Oracle + Sun merger</a> does not raise the question of &#8216;<em>what will happen to MySQL?&#8217;</em> alone. Because, along with the flagship database product, Oracle also has <a title="JDeveloper is a freeware IDE from Oracle. It offers features for development in Java, XML, SQL and PL/SQL, HTML, JavaScript, BPEL and PHP." href="http://en.wikipedia.org/wiki/JDeveloper">JDeveloper</a> which conflicts with Netbeans IDE. Both software are used for Java development, but it seems like Netbeans has a <a title="Google trends for Netbeans and JDeveloper" href="http://www.google.com/trends?q=netbeans%2C+jdeveloper">widespread use</a> than JDeveloper. So, after Oracle acquisition of Sun, will the database giant continue to develop Netbeans?</p>
<p>The Slide below, which seems to be from Oracle, could explain the <strong>Oracle&#8217;s take on Netbeans IDE</strong>.</p>
<div id="attachment_1276" class="wp-caption aligncenter" style="width: 469px">
	<img class="size-full wp-image-1276" title="oracle_netbeans_strategy" src="http://veerasundar.com/blog/wp-content/uploads/2010/01/oracle_netbeans_strategy.jpg" alt="Oracle's strategy for Netbeans IDE" width="469" height="340" />
	<p class="wp-caption-text">Oracle&#39;s strategy for Netbeans IDE</p>
</div>
<p>In Summary, (<em>if the above image is not displayed or not clear)</em></p>
<ul>
<li><strong>Netbeans IDE </strong>support will be continued &#8211; more focus on Java EE6, Java ME, Scripting and dynamic languages.</li>
<li><strong>JDeveloper</strong> also will be continued as an IDE for <em>Oracle Fusion Middleware</em>.</li>
<li>Oracle will continue it&#8217;s <strong>contribution to Eclipse </strong>as <a title="A Strategic Developer and Board Member of the Eclipse Foundation, Oracle is a leading participant in the Eclipse Web Tools Platform and Technology  projects." href="http://www.oracle.com/technology/tech/eclipse/index.html"><em>Strategic Member</em></a> of Eclipse foundation.</li>
</ul>
<p>It is clearly evident that Oracle can not halt the Netbeans IDE development. The IDE is already open sourced and if Oracle does halt the Netbeans development, it might have to face the negative feedback coming from the Netbeans developer community, for which Oracle may not be ready, <em>yet.</em></p>
<p>So, what do you think about this move? You even concerned on this move or you just happy with your own copy of <a href="http://eclipse.org/">Eclipse </a>? <img src='http://veerasundar.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1275&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/05/free-tool-for-monitoring-and-profiling-java-application-ibm-health-center/" title="Free tool for monitoring and profiling Java application &#8211; IBM Health Center">Free tool for monitoring and profiling Java application &#8211; IBM Health Center</a></li><li><a href="http://veerasundar.com/blog/2009/11/15-creative-java-applications-based-on-netbeans-platform/" title="15+ Creative Java applications based on Netbeans Platform">15+ Creative Java applications based on Netbeans Platform</a></li><li><a href="http://veerasundar.com/blog/2009/06/eclipse-galileo-released-available-for-download/" title="Eclipse Galileo Released &#8211; Available for Download">Eclipse Galileo Released &#8211; Available for Download</a></li><li><a href="http://veerasundar.com/blog/2009/06/java-warehouse-is-live/" title="Java warehouse is live!">Java warehouse is live!</a></li><li><a href="http://veerasundar.com/blog/2009/04/basic-introduction-to-apache-ant/" title="Basic introduction to Apache Ant">Basic introduction to Apache Ant</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=6Ae_ry1eaMM:fBuTWvnjk4c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=6Ae_ry1eaMM:fBuTWvnjk4c:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=6Ae_ry1eaMM:fBuTWvnjk4c:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=6Ae_ry1eaMM:fBuTWvnjk4c:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=6Ae_ry1eaMM:fBuTWvnjk4c:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=6Ae_ry1eaMM:fBuTWvnjk4c:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=6Ae_ry1eaMM:fBuTWvnjk4c:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=6Ae_ry1eaMM:fBuTWvnjk4c:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/6Ae_ry1eaMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/what-does-oracle-plan-for-netbeans-ide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/what-does-oracle-plan-for-netbeans-ide/</feedburner:origLink></item>
		<item>
		<title>Firefox 3.6 released – First impressions.</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/jspYjjFp_TI/</link>
		<comments>http://veerasundar.com/blog/2010/01/firefox-3-6-released-first-impressions/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 23:48:45 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox-3.6]]></category>
		<category><![CDATA[firefox3.6]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[relese]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1260</guid>
		<description><![CDATA[Today Mozilla has released a major update to the most popular browser around here &#8211; Firefox 3.6. This release does not contain any major features that makes the users WOW! But, still it is worth mentioning the few features that this release brings with it. Btw, if you have not downloaded the latest release here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img class="alignleft" title="Firefox 3.6 released - First impressions." src="http://i187.photobucket.com/albums/x201/talktoveera/logo-wordmark-version.png" alt="Firefox 3.6 released - First impressions." width="304" height="76" />Today Mozilla has released a major update to the most popular browser around here &#8211; <strong>Firefox 3.6</strong>. This release does not contain any major features that makes the users WOW! But, still it is worth mentioning the few features that this release brings with it. Btw, if you have not downloaded the latest release here&#8217;s the link for you: <a title="Download Firefox 3.6" href="http://www.mozilla.com/en-US/firefox/upgrade.html">Download Firefox 3.6</a></p>
<ul>
<li><strong>Personas </strong>for easy browser skins.</li>
<li><strong>Open Video support </strong>with the ability to maximize the video to full screen.</li>
<li><a title="Firefox 3.6 supports Web Open Font Format" href="http://veerasundar.com/blog/2009/10/firefox-3-6-to-support-web-open-font-format/"><strong>Web Open Font Format </strong>support</a> that enables the web developers to use any font as they wish without worrying about the availability of the font in user&#8217;s system.</li>
<li><strong>Performance </strong>as every Firefox release claims &#8211; Javascript performance improved, startup time is reduced and browser become more responsive.</li>
<li><strong>CSS Gradients </strong>and <strong>File Upload </strong>that takes out some pain out of web developer&#8217;s life. There&#8217;s <a title="File upload &amp; Firefox 3.6" href="http://demos.hacks.mozilla.org/openweb/uploadingFiles/">cool demo for the File upload</a> &#8211; Do try it out.</li>
</ul>
<p>That&#8217;s very much about the important features of Firefox 3.6. But, you can always look at <a title="Firefox 3.6 release notes" href="http://www.mozilla.com/en-US/firefox/3.6/releasenotes/">Firefox 3.6 release notes</a> to get a glimpse of what&#8217;s new in Firefox 3.6.</p>
<h2>First impression of Firefox 3.6:</h2>
<ul>
<li><strong>Loads quickly </strong>- release after release Mozilla makes one thing clear &#8211; to load the Firefox as quickly as possible. With Firefox 3.6 I could see a considerable improvement on this. Anyway, I tried without much of Add-ons. If add-ons are included, I guess, again the startup time might degrade.</li>
<li><strong>Improved performance </strong>- yes! I can see a lots of difference in the <em>page render time</em>. It almost comes close to the Chrome&#8217;s performance.</li>
<li><strong>Cool Gradients </strong>- yes, I should say that. No more <em>GIMPing or Photoshopping</em>. Just specify the colors in CSS and you are good to go with colorful buttons. Have a look at this page for <a title="Sample Gradients in Firefox 3.6" href="http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/">sample gradient buttons</a>. Before clicking, make sure that you are <a title="Download Firefox 3.6" href="http://www.mozilla.com/en-US/firefox/upgrade.html">running a Firefox 3.6</a>.</li>
</ul>
<p>It is still not possible to <strong>close that one single last tab </strong>in Firefox 3.6. If you are wondering how to fix this, have a look at this one: <a title="Fix to close the last tab in Firefox 3.6 and Firefox 3.5" href="http://veerasundar.com/blog/2009/07/closing-the-last-tab-in-firefox-35/">Closing the last tab in Firefox 3.5</a> (works for 3.6 also)</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1260&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/08/firefox-3-6-alpha-version-is-now-available-for-download/" title="Firefox 3.6 Alpha version is now available for download">Firefox 3.6 Alpha version is now available for download</a></li><li><a href="http://veerasundar.com/blog/2009/11/firefox-3-6-beta-available-for-download/" title="Firefox 3.6 beta available for download">Firefox 3.6 beta available for download</a></li><li><a href="http://veerasundar.com/blog/2009/10/firefox-3-6-to-support-web-open-font-format/" title="Firefox 3.6 to support Web Open Font Format">Firefox 3.6 to support Web Open Font Format</a></li><li><a href="http://veerasundar.com/blog/2009/07/downloadable-fonts-in-firefox-35/" title="Downloadable fonts in Firefox 3.5">Downloadable fonts in Firefox 3.5</a></li><li><a href="http://veerasundar.com/blog/2009/06/firefox-35-released-fast-cute-cool-and-works/" title="Firefox 3.5 released &#8211; Fast, Cute, Cool and Works!">Firefox 3.5 released &#8211; Fast, Cute, Cool and Works!</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=jspYjjFp_TI:y2KmRZ9U_Dc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=jspYjjFp_TI:y2KmRZ9U_Dc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=jspYjjFp_TI:y2KmRZ9U_Dc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=jspYjjFp_TI:y2KmRZ9U_Dc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=jspYjjFp_TI:y2KmRZ9U_Dc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=jspYjjFp_TI:y2KmRZ9U_Dc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=jspYjjFp_TI:y2KmRZ9U_Dc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=jspYjjFp_TI:y2KmRZ9U_Dc:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/jspYjjFp_TI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/firefox-3-6-released-first-impressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/firefox-3-6-released-first-impressions/</feedburner:origLink></item>
		<item>
		<title>Best Linux platform for Web and Java development?</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/XiI-vqhKhTE/</link>
		<comments>http://veerasundar.com/blog/2010/01/best-linux-platform-for-web-and-java-development/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 13:42:04 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1247</guid>
		<description><![CDATA[I have been a Windows user ever since I started using computers. Be it my school, college or work &#8211; I have never used Unix / Linux for actual development work. Even though I have coded few lines of Perl in Unix, I don&#8217;t consider that as actual programming. Linux &#8211; sorry I just installed [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have been a Windows user ever since I started using computers. Be it my school, college or work &#8211; I have never used Unix / Linux for actual development work. Even though I have coded few lines of Perl in Unix, I don&#8217;t consider<em> that </em>as actual programming. Linux &#8211; sorry I just installed one flavor in my laptop and then forgot about it!</p>
<p>So, why am I talking about Linux platform now? Well, I&#8217;m thinking of building a new PC some time soon and along with that I&#8217;m planning to switch to Linux. But I don&#8217;t have much knowledge about the several linux platforms, available out there. So, that&#8217;s why I&#8217;m reaching out to you.</p>
<h2>Choosing a &#8216;good&#8217; Linux distribution for Web and Java development:</h2>
<p>Here are my requirements:</p>
<ul>
<li>I need the <strong>LAMP environment</strong> &#8211; something like <a title="XAMPP – Apache, MySQL, PHP, Perl environment in Windows" href="http://veerasundar.com/blog/2009/07/xampp-apache-mysql-php-perl-environment-in-windows/">XAMPP</a> in Linux.</li>
<li>I need Java Development environment &#8211; <strong>Netbeans </strong>or <strong>Eclipse </strong>or any other IDE.</li>
<li>I need a good <strong><em>light-weight</em></strong><strong>Text Editor </strong>- something like <a title="Notepad++ – a cool source code editor" href="http://veerasundar.com/blog/2009/04/notepad-a-cool-source-code-editor/">Notepad++</a>.</li>
<li>I need <strong>Firefox</strong> &#8211; and all other <a title="20+ Firefox Add-ons for web developers" href="http://veerasundar.com/blog/2009/07/20-firefox-add-ons-for-web-developers/">web developer extensions</a>.</li>
<li>I need <strong>GIMP</strong>, <strong>Subversion and a Media Player </strong>(Winamp?), <strong>a PDF reader</strong> and a <strong>FTP Client</strong> (WinSCP?).</li>
</ul>
<p>Those are my basic set of requirements as of now. Please <strong>suggest a good Linux distribution</strong> which is capable of satisfying my needs above.</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1247&type=feed" alt="" /><h2  class="related_post_title">Most Popular Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/07/log4j-tutorial-adding-log4j-logging-to-your-project/" title="Log4j Tutorial : Adding Log4j logging to your project">Log4j Tutorial : Adding Log4j logging to your project</a></li><li><a href="http://veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/" title="How to change the &#8216;root&#8217; password for MySQL in XAMPP?">How to change the &#8216;root&#8217; password for MySQL in XAMPP?</a></li><li><a href="http://veerasundar.com/blog/2009/11/15-creative-java-applications-based-on-netbeans-platform/" title="15+ Creative Java applications based on Netbeans Platform">15+ Creative Java applications based on Netbeans Platform</a></li><li><a href="http://veerasundar.com/blog/2009/07/closing-the-last-tab-in-firefox-35/" title="Closing the last tab in Firefox 3.5">Closing the last tab in Firefox 3.5</a></li><li><a href="http://veerasundar.com/blog/2009/08/log4j-tutorial-additivity-what-and-why/" title="Log4j Tutorial: Additivity &#8211; what and why?">Log4j Tutorial: Additivity &#8211; what and why?</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=XiI-vqhKhTE:yoKA3eLiRAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=XiI-vqhKhTE:yoKA3eLiRAs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=XiI-vqhKhTE:yoKA3eLiRAs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=XiI-vqhKhTE:yoKA3eLiRAs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=XiI-vqhKhTE:yoKA3eLiRAs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=XiI-vqhKhTE:yoKA3eLiRAs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=XiI-vqhKhTE:yoKA3eLiRAs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=XiI-vqhKhTE:yoKA3eLiRAs:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/XiI-vqhKhTE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/best-linux-platform-for-web-and-java-development/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/best-linux-platform-for-web-and-java-development/</feedburner:origLink></item>
		<item>
		<title>java.lang.IllegalArgumentException: Illegal group reference in String.replaceAll</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/RSi4t9fB9XI/</link>
		<comments>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:24:40 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1239</guid>
		<description><![CDATA[I was working on an internal project that is used for archiving user&#8217;s blog posts. I released this application to an internal community and it was recieved quite well by the users. I made sure that the code was bug free, as far as I tested it and the code was working as expected with [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I was working on an internal project that is used for archiving user&#8217;s blog posts. I released this application to an internal community and it was recieved <em>quite</em> well by the users. I made sure that the code was bug free, as far as I tested it and the code was working as expected with out any <em>serious </em>issues. But what is an application when there is no bug in it?</p>
<p>One user got back to me saying that the code successfully downloaded the blog posts but it failed during the index building process. The index building process was doing a simple string replacement, replacing a pattern with the list of archived posts links. I was using String.replaceAll() method for this. The user reported back that he is getting the exception: <em>java.lang.IllegalArgumentException: Illegal group reference</em>.</p>
<p>Initially I was clueless about why it is throwing the exception. But later when I debugged the code, I found that the exception was thrown because of the <strong>$ symbols </strong>that were present in the parameters to the replaceAll() method. To make it clear, have a look at the below code:</p>
<pre class="brush:java">public static void main(String args[]) throws Exception {
    String template = "The user has spent amount in a day";
    String pattern = "amount";
    String output = template.replaceAll(pattern, "$ 100");
    System.out.println(output);
}
</pre>
<p>If you think that the above code will run without a issue and print <em>&#8220;The use has spent $ 100 in a day&#8221;</em>, then you are wrong. Here&#8217;s what this code will spit out:</p>
<pre class="brush:text">Exception in thread "main" java.lang.IllegalArgumentException: Illegal group reference
        at java.util.regex.Matcher.appendReplacement(Matcher.java:713)
        at java.util.regex.Matcher.replaceAll(Matcher.java:813)
        at java.lang.String.replaceAll(String.java:2190)
        at demo.BugDemo.main(BugDemo.java:16)
Java Result: 1
</pre>
<p>The exception is thrown because the replacement string (i.e. &#8220;$ 100&#8243;) contains a $ symbol in it. And the <a title="Implements a non-terminal append-and-replace step. " href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Matcher.html#appendReplacement%28java.lang.StringBuffer,%20java.lang.String%29">Matcher.appendReplacement()</a> class internally uses the $ symbol as a identifier for <em>grouping</em>. So inorder to avoid this, the $ symbol in the replacement string needs to be escaped using \\$. So after this fix, the correct code for the above program would be:</p>
<pre class="brush:java">String output = template.replaceAll(pattern, "\\$ 100");
</pre>
<p>Hm.. perfect. This incident reminds me that debugging can teach us a lot than the actual development.</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1239&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/" title="Spring AOP Example: Profiling method execution time tutorial">Spring AOP Example: Profiling method execution time tutorial</a></li><li><a href="http://veerasundar.com/blog/2009/11/log4j-mdc-mapped-diagnostic-context-example-code/" title="Log4j MDC (Mapped Diagnostic Context) : Example code">Log4j MDC (Mapped Diagnostic Context) : Example code</a></li><li><a href="http://veerasundar.com/blog/2009/10/eclipse-tip-how-to-use-scrapbook-pages-in-eclipse/" title="[Eclipse Tip] How to use Scrapbook pages in Eclipse?">[Eclipse Tip] How to use Scrapbook pages in Eclipse?</a></li><li><a href="http://veerasundar.com/blog/2009/08/how-to-create-a-new-log-file-for-each-time-the-application-runs/" title="How to create a new log file for each time the application runs?">How to create a new log file for each time the application runs?</a></li><li><a href="http://veerasundar.com/blog/2009/08/log4j-tutorial-additivity-what-and-why/" title="Log4j Tutorial: Additivity &#8211; what and why?">Log4j Tutorial: Additivity &#8211; what and why?</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=RSi4t9fB9XI:GDXv1sTTcic:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=RSi4t9fB9XI:GDXv1sTTcic:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=RSi4t9fB9XI:GDXv1sTTcic:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=RSi4t9fB9XI:GDXv1sTTcic:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=RSi4t9fB9XI:GDXv1sTTcic:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=RSi4t9fB9XI:GDXv1sTTcic:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=RSi4t9fB9XI:GDXv1sTTcic:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=RSi4t9fB9XI:GDXv1sTTcic:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/RSi4t9fB9XI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/java-lang-illegalargumentexception-illegal-group-reference-in-string-replaceall/</feedburner:origLink></item>
		<item>
		<title>Adsense and my Blog</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/c0YJOKo6Sg8/</link>
		<comments>http://veerasundar.com/blog/2010/01/adsense-and-my-blog/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 12:02:30 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[adsense]]></category>
		<category><![CDATA[advertisement]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[monetize]]></category>
		<category><![CDATA[readability]]></category>
		<category><![CDATA[readers]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1231</guid>
		<description><![CDATA[I have been using Adsense for monetizing my blog content, ever since I started this blog. Even though I&#8217;m not making a BIG money out of it, for every 3 or 4 months, I&#8217;m hitting the threshold amount set by Adsense. So, I feel it&#8217;s kinda OK for a small blog like mine.
In this post, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have been using Adsense for monetizing my blog content, ever since I started this blog. Even though I&#8217;m not making a BIG money out of it, for every 3 or 4 months, I&#8217;m hitting the threshold amount set by Adsense. So, I feel it&#8217;s kinda OK for a small blog like mine.</p>
<p>In this post, I just wanted to share some of my observations on using Adsense. Please note that my experience with Adsense is <em>just 1 year</em>. So, my observations are limited to the past one year time period only.</p>
<h2>Adsense and the readability of a Blog:</h2>
<p>Some of my readers (at least the folks from whom I got feedback) feel that placing Adsense ads inside the post <em>might </em>reduce the readability of the blog &#8211; but I beg to differ with them. Because one or two ads may not have much impact on the readability of the post. I have seen several popular bloggers are using Adsense inside the posts (for example, Coding Horror, Smashing Magazine). But placing too many advertisements inside the post is strictly a bad thing and it should be avoided at any cost. Too many ads turns your blog into a race car!</p>
<p><img class="aligncenter" title="Too Many Ads are good for nothing" src="http://i187.photobucket.com/albums/x201/talktoveera/3969107683_5e4582392e.jpg" alt="Too Many Ads are good for nothing" width="500" height="236" /></p>
<h2>Targeting the developer / tech community<span style="font-weight: normal; font-size: 13px;">:</span></h2>
<p>I have already told that my blog is not making big money out of Adsenes even though it gets a good traffic. One reason I can think of is the readership community to which your are targeting your blog. Most of my blog readers are either developers or tech bloggers. They know <em>very well</em> about Adsense. So, they may not click on them accidentally unless there is a valid ad which is getting their attention. So, less click-through-rate. This is the case of my blog, but I&#8217;m not sure how other developer blogs are performing. If you run one, kindly share your view.</p>
<h2>Blog Traffic and Adsense earnings are directly proportional?</h2>
<p><img class="alignright" title="Blog Traffic and Adsense Click Through Rate" src="http://i187.photobucket.com/albums/x201/talktoveera/234944758_e081ae9afd.jpg" alt="Blog Traffic and Adsense Click Through Rate" width="225" height="300" />I would say <strong>NO</strong>. Because it is not only depend on the traffic, but the <strong>source of the traffic.</strong> From where your readers are coming &#8211; search engines, developer forums or social networking sites &#8211; is mostly affect the click through rates of Adsense. In my experience, traffic coming from search engines has high click through rate than the traffic coming from a developer forum.</p>
<h2>Got High Traffic from Search Engine but very low ad clicks?</h2>
<p>Yes. It might happen. Because the user will click on the ad only if the ad is useful to him/her. Users wont click on the ads just like that. So, to get a better click through rate, you need to have <strong>Good Content + Good Traffic + </strong>and <strong>Good Ads </strong>too. You get good (i.e. high paying) ads only if your blog has a better <strong>page rank.</strong></p>
<p>If you are reader of my blog or a fellow blogger, please feel free to share your view on Adsense usage.</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1231&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/09/google-adsense-payment-recieved/" title="Google Adsense payment recieved :-)">Google Adsense payment recieved :-)</a></li><li><a href="http://veerasundar.com/blog/2009/12/feedburner-tweets-your-post-when-you-publish-a-new-one/" title="Feedburner tweets your post when you publish a new one!">Feedburner tweets your post when you publish a new one!</a></li><li><a href="http://veerasundar.com/blog/2009/11/spdy-a-protocol-from-google-for-speeding-up-web/" title="SPDY &#8211; A Protocol from Google for Speeding up Web">SPDY &#8211; A Protocol from Google for Speeding up Web</a></li><li><a href="http://veerasundar.com/blog/2009/10/google-friend-connect-an-invite-to-join-my-community/" title="Google Friend Connect : An invite to join my community ">Google Friend Connect : An invite to join my community </a></li><li><a href="http://veerasundar.com/blog/2009/10/google-wave-experience/" title="Google Wave Experience">Google Wave Experience</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=c0YJOKo6Sg8:_wMU-_9mdFE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=c0YJOKo6Sg8:_wMU-_9mdFE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=c0YJOKo6Sg8:_wMU-_9mdFE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=c0YJOKo6Sg8:_wMU-_9mdFE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=c0YJOKo6Sg8:_wMU-_9mdFE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=c0YJOKo6Sg8:_wMU-_9mdFE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=c0YJOKo6Sg8:_wMU-_9mdFE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=c0YJOKo6Sg8:_wMU-_9mdFE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/c0YJOKo6Sg8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/adsense-and-my-blog/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/adsense-and-my-blog/</feedburner:origLink></item>
		<item>
		<title>Use cases of Aspect Oriented Programming</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/SFhek-xsSRQ/</link>
		<comments>http://veerasundar.com/blog/2010/01/use-cases-of-aspect-oriented-programming/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 05:51:09 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[aop]]></category>
		<category><![CDATA[aspect]]></category>
		<category><![CDATA[cross-cutting]]></category>
		<category><![CDATA[discussion]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[use-cases]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1220</guid>
		<description><![CDATA[In my last article about Aspect Oriented Programming (AOP), I explained how to use Spring AOP for profiling method execution time. When the article was posted in DZone, it got a comment from an user saying that
Profiling and logging seem to be to only imaginable AOP use cases.
But, I think it is not. Because AOP [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In my last article about <strong>Aspect Oriented Programming</strong> (AOP), I explained <a title="Spring AOP Example: Profiling method execution time tutorial" href="http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/">how to use Spring AOP for profiling method execution time</a>. When the article was <a href="http://www.dzone.com/links/spring_aop_example_profiling_method_execution_tim.html">posted</a> in DZone, it got a comment from <a href="http://www.dzone.com/links/users/profile/388907.html">an user</a> saying that</p>
<blockquote><p>Profiling and logging seem to be to only imaginable AOP use cases.</p></blockquote>
<p>But, I think <strong>it is not</strong>. Because AOP is an extensive area where a lot of examples can be shown as use cases of AOP. Here, &#8220;Use cases&#8221; are nothing but the <strong>cross cutting concerns</strong> in your application. That is, the functionalities that are used by many part of your application. Logging and Profiling are the best examples and can be easily explained for the cross cutting concerns. That is why in most of the AOP tutorials you can see a logging example or profiling.</p>
<p>Anyway, I tried to do some search on the various AOP cross-cutting concerns (i.e. the <em>use cases</em>) that can be found in an J2EE applications. Here is the list of them. Feel free to add if I&#8217;m missing/wrongly added something.</p>
<h2>List of AOP Use Cases or Cross cutting concerns:</h2>
<ul>
<li><strong>Transaction Management</strong> &#8211; in an enterprise application, you can manage the transactional requests using AOP. For example, using the <em>Around </em>advice, you can wrap the request processing method and if the method fails for some reason, in your Advice, you can roll back the particular transaction.</li>
<li><strong>Access control or Security </strong>- in case you want to restrict the access to your method to a set of users, you can add these checks to the <em>Before </em>advice and verify the access credentials of the users before letting them to access your methods.</li>
<li><strong>Managing Quotas for your API </strong>- if your API is being used by many third party applications with predefined quotas, you can limit the access based the usage in your AOP advice. If the usage is below the allowed limit, the Advice can let the user to call the API or blocks it otherwise. This is something similar to the Google App Engine / Amazon services quota usages. But I&#8217;m not sure how Google/Amazon has implemented the quota limiting.</li>
<li><strong>Exception Wrapping</strong> &#8211; if you want to wrap a exception, thrown from your business methods, into a Common exception object and throw it to the top level layers, you can use <em>After throwing </em>advice to do the task. For example, if you want to wrap all the SQLExceptions into DAOLayerException object and throw it back to Service layer, instead of doing the exception wrapping in every single DAO method, you can implement the exception wrapping in an <em>After throwing advice</em> and it&#8217;s done.</li>
<li><strong>Logging and Profiling &#8211; </strong>off course, how can I leave these two? The evergreen examples(!) for the AOP.</li>
</ul>
<p>I understand that this list is not an extensive one. So, if you have any more use cases to add this list, please leave a comment.</p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1220&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/" title="Spring AOP Example: Profiling method execution time tutorial">Spring AOP Example: Profiling method execution time tutorial</a></li><li><a href="http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction/" title="Aspect Oriented Programming Using Spring AOP &#8211; An Introduction">Aspect Oriented Programming Using Spring AOP &#8211; An Introduction</a></li><li><a href="http://veerasundar.com/blog/2009/04/the-aspect-oriented-way-of-programming/" title="The Aspect Oriented way of Programming">The Aspect Oriented way of Programming</a></li><li><a href="http://veerasundar.com/blog/2010/01/happy-birthday-2010/" title="Happy Birthday, 2010!">Happy Birthday, 2010!</a></li><li><a href="http://veerasundar.com/blog/2009/12/how-do-you-use-logging-in-your-application/" title="How do you use logging in your application?">How do you use logging in your application?</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=SFhek-xsSRQ:MR2J4nVI7lA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=SFhek-xsSRQ:MR2J4nVI7lA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=SFhek-xsSRQ:MR2J4nVI7lA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=SFhek-xsSRQ:MR2J4nVI7lA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=SFhek-xsSRQ:MR2J4nVI7lA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=SFhek-xsSRQ:MR2J4nVI7lA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=SFhek-xsSRQ:MR2J4nVI7lA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=SFhek-xsSRQ:MR2J4nVI7lA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/SFhek-xsSRQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/use-cases-of-aspect-oriented-programming/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/use-cases-of-aspect-oriented-programming/</feedburner:origLink></item>
		<item>
		<title>Spring AOP Example: Profiling method execution time tutorial</title>
		<link>http://feedproxy.google.com/~r/veerasundar/dreamz/~3/hJWCeOO3GIg/</link>
		<comments>http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 07:55:19 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[aop]]></category>
		<category><![CDATA[aspect]]></category>
		<category><![CDATA[aspectj]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=1208</guid>
		<description><![CDATA[I have already written about the Spring Aspect Oriented Programming (AOP) with the use of simple logging example. But, somehow I felt that the example code was little confusing for the newcomers. So, I decided to write a new Spring AOP example code that explains how to use Spring AOP for profiling method execution time.
Using [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have already written about the <em>Spring Aspect Oriented Programming (AOP)</em> with the use of simple logging example. But, somehow I felt that the example code was little confusing for the newcomers. So, I decided to write a new Spring AOP example code that explains how to use Spring AOP for profiling method execution time.</p>
<h2>Using Spring AOP to profile method execution time:</h2>
<p>The example I chose is very simple &#8211; our application has a business class and a business method. We are going to profile how much time does it take to execute the business method. We will use Spring AOP for profiling the execution time. Since, profiling is a best example for <em>cross cutting concern</em>, it&#8217;s a good decision to use Spring AOP for implementing it. I&#8217;ll explain these in step by step. Meanwhile, you can <a title="Download source code for Spring AOP example" href="http://www.box.net/shared/9nygu7t80t">download the source code</a><strong> </strong>(excluding dependent JAR file, for which you can see the download links below).</p>
<p>And, here&#8217;s the library versions I&#8217;m using: <a title="Download Spring 2.5.4 JAR" href="http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-2.5.4.zip">Spring 2.5.4</a>, JDK 1.6, <a title="Download commons logging" href="http://mirrors.ibiblio.org/pub/mirrors/maven/commons-logging/jars/commons-logging-1.0.4.jar">Commons-logging-1.0.4</a>, <a href="http://mirrors.ibiblio.org/pub/mirrors/maven/aspectj/jars/aspectjrt-1.2.jar">aspectjrt-1.2</a>, <a href="http://mirrors.ibiblio.org/pub/mirrors/maven/aspectj/jars/aspectjweaver-1.5.3.jar">aspectjweaver-1.5.3</a>.</p>
<h2>1. Setting up the project structure:</h2>
<p>Launch your preferred IDE (I use Eclipse) and <em>Create New Java Project</em>. And then create the file structure as shown below (off course, no need to follow the package naming convention, <img src='http://veerasundar.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ).</p>
<p><img class="aligncenter size-full wp-image-1210" title="spring-aop-project-structure" src="http://veerasundar.com/blog/wp-content/uploads/2010/01/spring-aop-project-structure.png" alt="Spring AOP - Project Structure" width="342" height="244" /></p>
<p>You need to download all the JARs that are in <em>Referenced Libraries</em> and add them to the project&#8217;s class path. You can find these JARs here: <a title="Download Spring" href="http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-2.5.4.zip">Spring</a>, <a title="Download Commons-logging" href="http://mirrors.ibiblio.org/pub/mirrors/maven/commons-logging/jars/commons-logging-1.0.4.jar">Commons-logging</a>, <a title="Download AspectJrt" href="http://mirrors.ibiblio.org/pub/mirrors/maven/aspectj/jars/aspectjrt-1.2.jar">aspectjrt</a>, <a title="download Aspectjweaver" href="http://mirrors.ibiblio.org/pub/mirrors/maven/aspectj/jars/aspectjweaver-1.5.3.jar">aspectjweaver</a>. Also, please note that the file <strong>Business.java</strong> is an Interface. Other than this, all other java files are plain Classes.</p>
<h2>2. Writing our Business Logic:</h2>
<p>We will first write our business logic and then we will add Spring AOP to profile our business methods. Open <em>Business.java</em> interface and copy the below code into it.</p>
<pre class="brush:java">package com.veerasundar.spring.aop;

public interface Business {
        void doSomeOperation();
}</pre>
<p>Now, open the <em>BusinessImpl.java</em> and copy the below code into it.</p>
<pre class="brush:java">package com.veerasundar.spring.aop;

public class BusinessImpl implements Business {

        public void doSomeOperation() {
                System.out.println("I do what I do best, i.e sleep.");
                try {
                        Thread.sleep(2000);
                } catch (InterruptedException e) {
                        System.out.println("How dare you to wake me up?");
                }
                System.out.println("Done with sleeping.");
        }

}</pre>
<p>I guess this code is self explanatory. Our business method just sleeps for 2 seconds (good business, isn&#8217;t it!?) and then write some text on the console.</p>
<h2>3. Writing a Spring Aspect to profile business method:</h2>
<p>Lets write a Aspect which will profile our business method. I&#8217;m gonna use <strong>@Around</strong> advice (Lost in the jargons? <a title="Spring AOP basics" href="http://static.springsource.org/spring/docs/2.5.4/reference/aop.html#aop-introduction-defn" target="_blank">Spring AOP basics</a>). Open the <em>BusinessProfiler.java</em> file and copy the below code into it.</p>
<pre class="brush:java">package com.veerasundar.spring.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class BusinessProfiler {

        @Pointcut("execution(* com.veerasundar.spring.aop.*.*(..))")
        public void businessMethods() { }

        @Around("businessMethods()")
        public Object profile(ProceedingJoinPoint pjp) throws Throwable {
                long start = System.currentTimeMillis();
                System.out.println("Going to call the method.");
                Object output = pjp.proceed();
                System.out.println("Method execution completed.");
                long elapsedTime = System.currentTimeMillis() - start;
                System.out.println("Method execution time: " + elapsedTime + " milliseconds.");
                return output;
        }

}</pre>
<p>Here&#8217;s what this code does:</p>
<ol>
<li>Using <em>@AspectJ</em> annotation, we have declared that this class is an Aspect.</li>
<li>Using <em>@Pointcut</em> annotation, we have defined a pointcut that will match the execution of all public method inside com.veerasundar.spring.aop package<strong>.</strong> [<a title="Spring Aspect Oriented Programming - Pointcut examples" href="http://static.springsource.org/spring/docs/2.5.4/reference/aop.html#aop-pointcuts" target="_blank">read more about pointcut</a>]</li>
<li>Using <em>@Around</em> annotation, we have defined a Around advice which will be invoked <em>before</em> and <em>after</em> our business method. i.e. @Around advice will wrap our business method. As you can see in the above code, <em>pjp.proceed()</em><strong>.</strong> This is when our business method gets called from @Around advice.</li>
</ol>
<h2>4. Configuring Spring AOP and @AspectJ support:</h2>
<p>Open the <em>applicationContext.xml</em> file and copy the below code into it.</p>
<pre class="brush:xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"&gt;

        &lt;!-- Enable the @AspectJ support --&gt;
        &lt;aop:aspectj-autoproxy /&gt;

        &lt;bean id="businessProfiler" class="com.veerasundar.spring.aop.BusinessProfiler" /&gt;
        &lt;bean id="myBusinessClass" class="com.veerasundar.spring.aop.BusinessImpl" /&gt;
&lt;/beans&gt;</pre>
<p>Here&#8217;s what we are doing in the above XML file:</p>
<ol>
<li>We have added the <a title="XML Schemas required for Spring AOP support" href="http://static.springsource.org/spring/docs/2.5.4/reference/xsd-config.html#xsd-config-body-schemas-aop" target="_blank">required AOP schemas</a> on the top of the XML file.</li>
<li>Using &lt;aop:aspectj-autoproxy /&gt;, we&#8217;ve enabled the @AspectJ support to our application.</li>
<li>And then we defined two normal Spring beans &#8211; one for our Business class and the other for Business Profiler (i.e. our aspect).</li>
</ol>
<p>That&#8217;s it. With all the above code is done, we have successfully added Spring AOP support to our project and configured it. In the next step, lets test our code.</p>
<h2>5. Testing the Spring AOP profiler:</h2>
<p>Open the file <em>SpringAOPDemo.java</em> and copy the below lines into it.</p>
<pre class="brush:java">package com.veerasundar.spring.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringAOPDemo {

        /**
         * @param args
         */
        public static void main(String[] args) {
                ApplicationContext context = new ClassPathXmlApplicationContext(
                                "applicationContext.xml");
                Business bc = (Business) context.getBean("myBusinessClass");
                bc.doSomeOperation();
        }

}</pre>
<p>In the above code we are loading our Business bean from Spring Context and then calling our business method. If you run this class, it will produce the following output on the console.</p>
<pre class="brush:text">Going to call the method.
I do what I do best, i.e sleep.
Done with sleeping.
Method execution completed.
Method execution time: 2000 milliseconds.</pre>
<h2>6. Spring AOP Flow &#8211; explained in sequence diagram:</h2>
<p>Here&#8217;s a sequence diagram that explains the flow of the above example.</p>
<p><a href="http://veerasundar.com/blog/wp-content/uploads/2010/01/spring-aop-explained.png"><img class="aligncenter size-full wp-image-1211" title="spring-aop-explained" src="http://veerasundar.com/blog/wp-content/uploads/2010/01/spring-aop-explained.png" alt="Sequence diagram of a Spring AOP application" width="610" height="403" /></a></p>
<p>I hope this tutorial helps you to understand the basics of Spring Aspect Oriented programming. If you have any questions regarding the above example, feel free to leave a comment<strong>.</strong></p>
<img src="http://veerasundar.com/blog/?ak_action=api_record_view&id=1208&type=feed" alt="" /><h2  class="related_post_title">Related Articles</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2009/04/springs-dependency-injection-as-i-see/" title="Spring&#8217;s Dependency Injection, as I see">Spring&#8217;s Dependency Injection, as I see</a></li><li><a href="http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction-part-2/" title="Aspect Oriented Programming Using Spring AOP &#8211; An Introduction [Part 2]">Aspect Oriented Programming Using Spring AOP &#8211; An Introduction [Part 2]</a></li><li><a href="http://veerasundar.com/blog/2009/04/aspect-oriented-programming-using-spring-aop-an-introduction/" title="Aspect Oriented Programming Using Spring AOP &#8211; An Introduction">Aspect Oriented Programming Using Spring AOP &#8211; An Introduction</a></li><li><a href="http://veerasundar.com/blog/2009/04/basic-introduction-to-apache-ant/" title="Basic introduction to Apache Ant">Basic introduction to Apache Ant</a></li><li><a href="http://veerasundar.com/blog/2010/01/use-cases-of-aspect-oriented-programming/" title="Use cases of Aspect Oriented Programming">Use cases of Aspect Oriented Programming</a></li></ul><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=hJWCeOO3GIg:hTubPrY8MNA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=hJWCeOO3GIg:hTubPrY8MNA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=hJWCeOO3GIg:hTubPrY8MNA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=hJWCeOO3GIg:hTubPrY8MNA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=hJWCeOO3GIg:hTubPrY8MNA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=hJWCeOO3GIg:hTubPrY8MNA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/veerasundar/dreamz?a=hJWCeOO3GIg:hTubPrY8MNA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/veerasundar/dreamz?i=hJWCeOO3GIg:hTubPrY8MNA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/veerasundar/dreamz/~4/hJWCeOO3GIg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://veerasundar.com/blog/2010/01/spring-aop-example-profiling-method-execution-time-tutorial/</feedburner:origLink></item>
	</channel>
</rss>
