<?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>Java Vibes..</title>
	<atom:link href="http://javavibes.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://javavibes.wordpress.com</link>
	<description>Musings of a Java developer</description>
	<lastBuildDate>Thu, 10 Dec 2009 09:26:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='javavibes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Java Vibes..</title>
		<link>http://javavibes.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://javavibes.wordpress.com/osd.xml" title="Java Vibes.." />
	<atom:link rel='hub' href='http://javavibes.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Java Quick References&#8230;</title>
		<link>http://javavibes.wordpress.com/2009/08/20/java-tips/</link>
		<comments>http://javavibes.wordpress.com/2009/08/20/java-tips/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 12:40:12 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[java tips]]></category>
		<category><![CDATA[jdbc rowsets]]></category>
		<category><![CDATA[jvm tuning]]></category>
		<category><![CDATA[xml namespaces]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=111</guid>
		<description><![CDATA[Here is some stuff that every Java developer must be aware of: XML schema namespaces (default namespace, target namespace etc): http://www.oracle.com/technology/pub/articles/srivastava_namespaces.html Java 5, JDBC RowSets: http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html , http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm#i630230, http://edocs.bea.com/wls/docs90/jdbc/rowsets.html#1041182 JVM tuning: http://raymondtay.blogspot.com/2008/09/j2eeweblogic-performance-tuning-with.html , http://blogs.sun.com/jonthecollector/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=111&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is some stuff that every Java developer must be aware of:</p>
<ul>
<li>XML schema namespaces (default namespace, target namespace etc): <a href="http://www.oracle.com/technology/pub/articles/srivastava_namespaces.html">http://www.oracle.com/technology/pub/articles/srivastava_namespaces.html</a></li>
<li>Java 5, JDBC RowSets: <a href="http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html">http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html</a> , <a href="http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm#i630230">http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/jcrowset.htm#i630230</a>, <a href="http://edocs.bea.com/wls/docs90/jdbc/rowsets.html#1041182">http://edocs.bea.com/wls/docs90/jdbc/rowsets.html#1041182</a></li>
<li>JVM tuning: <a href="http://raymondtay.blogspot.com/2008/09/j2eeweblogic-performance-tuning-with.html">http://raymondtay.blogspot.com/2008/09/j2eeweblogic-performance-tuning-with.html</a> , <a href="http://blogs.sun.com/jonthecollector/">http://blogs.sun.com/jonthecollector/</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=111&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/08/20/java-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernate Quick References&#8230;</title>
		<link>http://javavibes.wordpress.com/2009/08/19/hibernate-stuff/</link>
		<comments>http://javavibes.wordpress.com/2009/08/19/hibernate-stuff/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 11:41:36 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[java frameworks]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[hibernate caching]]></category>
		<category><![CDATA[hibernate performance]]></category>
		<category><![CDATA[hibernate tips]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=106</guid>
		<description><![CDATA[Here are some common tips that every hibernate developer must know. Will post detailed examples later, just posting a few quick links right now for ready reference: Hibernate tips and tricks: https://www.hibernate.org/118.html Hibernate performance Tips: http://docs.jboss.org/hibernate/stable/core/reference/en/html/performance.html Hibernate II level caching: http://www.javalobby.org/java/forums/t48846.html , http://blog.dynatrace.com/2009/03/24/understanding-caching-in-hibernate-part-three-the-second-level-cache/ Hibernate fetch strategies and lazy fetching: http://www.javalobby.org/java/forums/m91885142.html Hibernate n+1 selects problem: http://www.realsolve.co.uk/site/tech/hib-tip-pitfall.php?name=n1selects Hibernate [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=106&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are some common tips that every hibernate developer must know. Will post detailed examples later, just posting a few quick links right now for ready reference:</p>
<ul>
<li>Hibernate tips and tricks: <a style="text-decoration:none;" href="https://www.hibernate.org/118.html">https://www.hibernate.org/118.html</a></li>
<li>Hibernate performance Tips: <a href="http://docs.jboss.org/hibernate/stable/core/reference/en/html/performance.html">http://docs.jboss.org/hibernate/stable/core/reference/en/html/performance.html</a></li>
<li>Hibernate II level caching: <a href="http://www.javalobby.org/java/forums/t48846.html">http://www.javalobby.org/java/forums/t48846.html</a> , <a href="http://blog.dynatrace.com/2009/03/24/understanding-caching-in-hibernate-part-three-the-second-level-cache/">http://blog.dynatrace.com/2009/03/24/understanding-caching-in-hibernate-part-three-the-second-level-cache/</a></li>
<li>Hibernate fetch strategies and lazy fetching: <a style="text-decoration:none;" href="http://www.javalobby.org/java/forums/m91885142.html">http://www.javalobby.org/java/forums/m91885142.html</a></li>
<li>Hibernate n+1 selects problem: <a href="http://www.realsolve.co.uk/site/tech/hib-tip-pitfall.php?name=n1selects">http://www.realsolve.co.uk/site/tech/hib-tip-pitfall.php?name=n1selects</a></li>
<li>Hibernate inheritance mapping: <a href="http://docs.jboss.org/hibernate/stable/core/reference/en/html/inheritance.html">http://docs.jboss.org/hibernate/stable/core/reference/en/html/inheritance.html</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=106&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/08/19/hibernate-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Template Pattern and Spring</title>
		<link>http://javavibes.wordpress.com/2009/06/30/template-pattern-and-spring/</link>
		<comments>http://javavibes.wordpress.com/2009/06/30/template-pattern-and-spring/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 13:09:41 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[architecture & design]]></category>
		<category><![CDATA[behavioral pattern]]></category>
		<category><![CDATA[design pattern]]></category>
		<category><![CDATA[GoF]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=56</guid>
		<description><![CDATA[As you might be aware, Template is a GoF behavioral pattern. Here I first explain what the Template pattern is and then show an example of the pattern as implemented in the Spring framework: Template works on the philosophy of Abstract classes, wherein the Abstract class implements some boiler plate functionality and let the subclasses [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=56&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As you might be aware, Template is a GoF behavioral pattern. Here I first explain what the Template pattern is and then show an example of the pattern as implemented in the Spring framework:</p>
<p>Template works on the philosophy of Abstract classes, wherein the Abstract class implements some boiler plate functionality and let the subclasses implement the specifics.</p>
<p style="font-size:13px;line-height:1.5em;margin:0 0 1em;padding:0;">For example, when you want to execute a JDBC query against a database, you have to implement the following steps:</p>
<ol style="list-style-type:decimal;list-style-position:initial;list-style-image:initial;margin:0 0 0 2em;padding:0;">
<li>Obtain a DataSource</li>
<li>Use the DataSource to get a Connection object</li>
<li>Use the Connection object to create a Statement (or a PreparedStatement)</li>
<li>Execute a query to get the ResultSet</li>
<li>Iterate over the results and create a list of VOs (as an example of a business logic)</li>
<li>Close the ResultSet</li>
<li>Close the Statement</li>
<li>Close the Connection</li>
</ol>
<p style="font-size:13px;line-height:1.5em;margin:0 0 1em;padding:0;">Out of the above steps, most of these are boiler plate code while steps #4 and #5 reflects the actual business logic. If you create a Template class (essentially an Abstract class) that models these steps and allow subclasses to customize the steps #4 and #5 then it will help subclasses reuse the boiler plate code.</p>
<p style="font-size:13px;line-height:1.5em;margin:0 0 1em;padding:0;">Spring does this by providing classes like JdbcTemplate, HibernateTemplate, JmsTemplate etc.  Here is how things work in the Spring world:</p>
<p style="text-align:center;"><img class="size-full wp-image-70 aligncenter" title="template" src="http://javavibes.files.wordpress.com/2009/06/template2.jpg" alt="template" width="374" height="212" /></p>
<pre>Example code:
List results = getHibernateTemplate().executeFind(new HibernateCallback() {
                   public Object doInHibernate(Session session) {
                       Query query = session.createQuery("from Event");
                       query.setMaxResults(2);
                       return query.list();
                   }
});</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=56&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/30/template-pattern-and-spring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>

		<media:content url="http://javavibes.files.wordpress.com/2009/06/template2.jpg" medium="image">
			<media:title type="html">template</media:title>
		</media:content>
	</item>
		<item>
		<title>Unix Find and Grep</title>
		<link>http://javavibes.wordpress.com/2009/06/28/unix-find-and-grep/</link>
		<comments>http://javavibes.wordpress.com/2009/06/28/unix-find-and-grep/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 13:55:36 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[unix tips]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=54</guid>
		<description><![CDATA[A lot of times we have to recursively find files and grep some text in each of the files, here is a handly command to do so: find . -name &#8220;*.log&#8221; -exec grep &#8220;mytext&#8221; {} \;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=54&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A lot of times we have to recursively find files and grep some text in each of the files, here is a handly command to do so:</p>
<p>find . -name &#8220;*.log&#8221; -exec grep &#8220;mytext&#8221; {} \;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=54&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/28/unix-find-and-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Structural Patterns</title>
		<link>http://javavibes.wordpress.com/2009/06/24/structural-patterns/</link>
		<comments>http://javavibes.wordpress.com/2009/06/24/structural-patterns/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:31:14 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[architecture & design]]></category>
		<category><![CDATA[adaptor pattern]]></category>
		<category><![CDATA[bridge pattern]]></category>
		<category><![CDATA[decorator pattern]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[facade pattern]]></category>
		<category><![CDATA[proxy pattern]]></category>
		<category><![CDATA[structural patterns]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=50</guid>
		<description><![CDATA[Proxy could be used when you want to lazy-instantiate an object, or hide the fact that you&#8217;re calling a remote service, or control access to the object. Decorator is also called &#8220;Smart Proxy.&#8221; This is used when you want to add functionality to an object, but not by extending that object&#8217;s type. This allows you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=50&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div><span style="font-family:Arial;font-size:medium;"><span style="border-collapse:collapse;line-height:18px;"><br />
</span></span></div>
<ul style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;list-style-type:disc;list-style-position:initial;list-style-image:initial;background-position:initial initial;border:0 initial initial;margin:0 0 1em 30px;padding:0;">
<li>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong>Proxy</strong> could be used when you want to lazy-instantiate an object, or hide the fact that you&#8217;re calling a remote service, or control access to the object.</p>
</li>
<li>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong>Decorator</strong> is also called &#8220;Smart Proxy.&#8221; This is used when you want to add functionality to an object, but not by extending that object&#8217;s type. This allows you to do so at runtime. Java I/O reader, writers are a fine example of this.</p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><img class="alignleft size-full wp-image-77" title="decorator" src="http://javavibes.files.wordpress.com/2009/06/decorator.jpg" alt="decorator" width="432" height="240" /></p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;">
</li>
<li>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong>Adapter</strong> the adapter design pattern (often referred to as the wrapper pattern or simply a wrapper) translates one interface for a class into a compatible interface. An adapter allows classes to work together that normally could not because of incompatible interfaces. Adapter is used when you&#8217;re trying to unify the interfaces of some incompatible classes that <em>already exist</em>. The Adapter functions as a kind of translator to implementations that could be considered <em>legacy</em>.</p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><img class="alignleft size-full wp-image-78" title="adapter" src="http://javavibes.files.wordpress.com/2009/06/adapter.jpg" alt="adapter" width="300" height="215" /></p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;">
<li><strong>Facade </strong>is a higher-level (read: simpler) interface to a subsystem of one or more classes. Think of Facade as a sort of container for other objects, as opposed to simply a wrapper.</li>
</li>
<li>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong>Bridge</strong> is very similar to Adapter, but it is used for code that is more likely to be greenfield. We call it Bridge when you define both the abstract interface and the underlying implementation i.e. you&#8217;re not adapting to some legacy or third-party code, you&#8217;re the designer of all the code but you need to be able to swap out different implementations.</p>
</li>
</ul>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong>Perhaps the most confusing of these is Bridge, here is how a wise guy has tried to define it: </strong></p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;">The Bridge pattern is an application of the old advice, &#8220;prefer composition over inheritance&#8221;. It becomes handy when you must subclass different times in ways that are orthogonal with one another. Say you must implement a hierarchy of colored shapes. You wouldn&#8217;t subclass Shape with Rectangle and Circle and then subclass Rectangle with RedRectangle, BlueRectangle and GreenRectangle and the same for Circle, would you? You would prefer to say that each Shape <em>has</em> a Color and to implement a hierarchy of colors, and that is the Bridge Pattern.</p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;">Here is an example of a Bridge:</p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><img class="alignleft size-full wp-image-102" title="bridge" src="http://javavibes.files.wordpress.com/2009/06/bridge2.jpg" alt="bridge" width="754" height="294" /></p>
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;">
<p style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;clear:both;background-position:initial initial;border:0 initial initial;margin:0 0 1em;padding:0;"><strong><em>Usage:</em></strong></p>
<pre>PersistenceImplementor implementor = null;
if (true){
	implementor = new DabatasePersistenceImplementor();
}else{
	implementor = new FileSystemPersistenceImplementor();
}
Persistence persistenceAPI = new PersistenceImp(implementor);
Object o = persistenceAPI.findById("12343755");
// do changes to the object then persist
persistenceAPI.persist(o);
persistenceAPI.deleteById("2323");</pre>
<ul style="font-size:100%;vertical-align:baseline;background-image:initial;background-repeat:initial;background-attachment:initial;background-color:transparent;list-style-type:disc;list-style-position:initial;list-style-image:initial;background-position:initial initial;border:0 initial initial;margin:0 0 1em 30px;padding:0;"></ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=50&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/24/structural-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>

		<media:content url="http://javavibes.files.wordpress.com/2009/06/decorator.jpg" medium="image">
			<media:title type="html">decorator</media:title>
		</media:content>

		<media:content url="http://javavibes.files.wordpress.com/2009/06/adapter.jpg" medium="image">
			<media:title type="html">adapter</media:title>
		</media:content>

		<media:content url="http://javavibes.files.wordpress.com/2009/06/bridge2.jpg" medium="image">
			<media:title type="html">bridge</media:title>
		</media:content>
	</item>
		<item>
		<title>Application Performance Optimization Tips</title>
		<link>http://javavibes.wordpress.com/2009/06/22/application-performance-optimization-tips/</link>
		<comments>http://javavibes.wordpress.com/2009/06/22/application-performance-optimization-tips/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:44:38 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[java tips]]></category>
		<category><![CDATA[performance optimization]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=46</guid>
		<description><![CDATA[In my experience, mostly database is the bottleneck, so the prime objective should be to optimize queries and to reduce the number of database calls and bring as much data together as possible. 1. Try to bring multiple result sets together from the database, use Stored procs if needed. 2. Use JDBC batch updates to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=46&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">In my experience, mostly database is the bottleneck, so the prime objective should be to optimize queries and to reduce the number of database calls and bring as much data together as possible.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">1. Try to bring multiple result sets together from the database, use Stored procs if needed.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">2. Use JDBC batch updates to club together multiple database updates in a single database call.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">3. Use Java caching of results wherever possible (using caching libraries, static variables etc).</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">4. Another possibility is to use static db views / summary tables, which can be nightly refreshed etc.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">5. Appropriate use of indexes in db tables can make a lot of difference, especially in case of complex joins etc.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">6. Reduce the amount of Java reflection being used in code or cache the reflection stuff.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">7. Do selective logging, check if log enabled before issuing a log statement.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">8. Tune app server params like increase connection pool size, -Xms, -Xmx, -XX:PermSize, -XX:MaxPermSize etc.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">9. Consider appropriate clustering of app servers, JMS queues etc and asynchronous execution of complex jobs (using JMS) etc</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">10. Use optimized XML parsing, serialization libraries etc.</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;padding-left:30px;">Using good profiling tools to find out pain areas is extremely important.</div>
<div style="padding-left:30px;">In my experience, mostly database is the bottleneck, so the prime objective should be to optimize queries and to reduce the number of database calls and bring as much data together as possible. Using good profiling tools to find out the pain areas is extremely important.</div>
<div>
<ol>
<li>Try to bring multiple result sets together from the database, use Stored procs if needed.</li>
<li>Use JDBC batch updates to club together multiple database updates in a single database call.</li>
<li>Use Java caching of results wherever possible (using caching libraries, static variables etc).</li>
<li>Another possibility is to use static db views / summary tables, which can be nightly refreshed etc.</li>
<li>Appropriate use of indexes in db tables can make a lot of difference, especially in case of complex joins etc.</li>
<li>Reduce the amount of Java reflection being used in code or cache the reflection stuff.</li>
<li>Do selective logging, check if log enabled before issuing a log statement.</li>
<li>Tune app server params like increase connection pool size, -Xms, -Xmx, -XX:PermSize, -XX:MaxPermSize etc.</li>
<li>Consider appropriate clustering of app servers, JMS queues etc and asynchronous execution of complex jobs (using JMS) etc.</li>
<li>Use optimized XML parsing, serialization libraries etc.</li>
</ol>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=46&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/22/application-performance-optimization-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Abstract Factory Pattern</title>
		<link>http://javavibes.wordpress.com/2009/06/22/abstract-factory-pattern/</link>
		<comments>http://javavibes.wordpress.com/2009/06/22/abstract-factory-pattern/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 10:13:23 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[architecture & design]]></category>
		<category><![CDATA[Abstract Factory]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[Factory Method]]></category>
		<category><![CDATA[Factory Pattern]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=35</guid>
		<description><![CDATA[I had implemented an Abstract Factory in one of my projects. Posting the details of the implementation here. The requirement is that for CDR database, there are 2 datasources, one for HongKong and one for US. And for ProdProfile database, there is only datasource for both locations. The location is not known at the compile [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=35&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had implemented an Abstract Factory in one of my projects. Posting the details of the implementation here.</p>
<p>The requirement is that for CDR database, there are 2 datasources, one for HongKong and one for US. And for ProdProfile database, there is only datasource for both locations. The location is not known at the compile time so we can&#8217;t inject datasource in the factory at compile time. Also passing the location in the getDao() method looks ugly since location is not required for all type of DAOs. And even ProductProfile datasource may become location specific in future.</p>
<p>I have tried to make one factory for each Location. The factory will instantiate different DAOs, whether the DAO is injected in the factory is location specific or not is controlled by Spring config.</p>
<p>AbstractDaoFactory:</p>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>CdrDao getCdrDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>ProdProfileDao getProdProfileDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">USDaoFactory extends AbstractDaoFactory</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>CdrDao getCdrDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>ProdProfileDao getProdProfileDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">HKDaoFactory extends AbstractDaoFactory</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>CdrDao getCdrDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>ProdProfileDao getProdProfileDao()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">CdrDao</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>setDS()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>loadProductList()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>&#8230;</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">CdrDaoImpl: 2 spring beans for this Impl, but different DS injected in these: USCdrDaoImpl, HKCdrDaoImpl</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">ChecklistDao</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>setDS()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span>loadChecklist()</div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="white-space:pre;"> </span></div>
<div id="_mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;">ChecklistDaoImpl: just 1 spring bean for this Impl, so both factories will return the same instance</div>
<div>Class AbstractDaoFactory:</div>
<div style="padding-left:30px;">+ CdrDao getCdrDao()</div>
<div style="padding-left:30px;">+ ProdProfuleDao getProdProfileDao()</div>
<div>Class USDaoFactory extends AbstractDaoFactory</div>
<div style="padding-left:30px;">+ CdrDao getCdrDao()</div>
<div style="padding-left:30px;">+ ProdProfileDao getProdProfileDao()</div>
<div>Class HKDaoFactory extends AbstractDaoFactory</div>
<div style="padding-left:30px;">+ CdrDao getCdrDao()</div>
<div style="padding-left:30px;">+ ProdProfileDao getProdProfileDao()</div>
<div>Interface CdrDao</div>
<div style="padding-left:30px;">+ setDs(DataSource ds)</div>
<div style="padding-left:30px;">+ loadLegCodes()</div>
<div>Interface ProdProfileDao</div>
<div style="padding-left:30px;">+ setDs(DataSource ds)</div>
<div style="padding-left:30px;">+ loadAllSeries()</div>
<div>
<div></div>
<div><span style="white-space:pre;"><span style="white-space:normal;">Class CdrDaoImpl: created 2 spring beans for this Impl, but different DS injected in these: USCdrDaoImpl, HKCdrDaoImpl</span></span></div>
<div></div>
</div>
<div>Class ProdProfileDaoImpl: created just 1 spring bean for this Impl, so both factories will return the same instance</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=35&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/22/abstract-factory-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Notes on QoS and Capacity Planning</title>
		<link>http://javavibes.wordpress.com/2009/06/22/notes-on-qos-and-capacity-planning/</link>
		<comments>http://javavibes.wordpress.com/2009/06/22/notes-on-qos-and-capacity-planning/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:48:13 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[architecture & design]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[availability]]></category>
		<category><![CDATA[capacity planning]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[extensibility]]></category>
		<category><![CDATA[maintainability]]></category>
		<category><![CDATA[manageability]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[QoS]]></category>
		<category><![CDATA[reliability]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=33</guid>
		<description><![CDATA[The architecture you create must address the following service-level requirements: performance, scalability, reliability, availability, extensibility, maintainability, manageability, and security. You will have to make trade-offs between these requirements. For example, if the most important service-level requirement is the performance of the system, you might sacrifice the maintainability and extensibility of the system to ensure that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=33&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The architecture you create must address the following service-level requirements: performance, scalability, reliability, availability, extensibility, maintainability, manageability, and security.</p>
<p>You will have to make trade-offs between these requirements. For example, if the most important service-level requirement is the performance of the system, you might sacrifice the maintainability and extensibility of the system to ensure that you meet the performance quality of service.</p>
<h2>Performance</h2>
<p>The performance requirement is usually measured in terms of response time for a given screen transaction per user. In addition to response time, performance can also be measured in transaction throughput, which is the number of transactions in a given time period, usually one second.</p>
<p>Some of the performance considerations to be taken care while designing systems are: Network overheads (making multiple fine grained network calls vis-à-vis a single course grained network call), Memory issues (Heap size for objects created on heap, Perm size for reflection and dynamically created objects), Logging issues (amount of logging, synchronous/asynchronous i/o etc), Concurrency issues (is thread safety needed).</p>
<h2>Scalability</h2>
<p>Scalability is the ability to support the required quality of service as the system load increases without changing the system. A system can be considered scalable if, as the load increases, the system still responds within the acceptable limits.</p>
<p>The capacity of a system is defined as the maximum number of processes or users a system can handle and still maintain the quality of service. If a system is running at capacity and can no longer respond within an acceptable time frame, then it has reached its maximum scalability. Scalability can be added vertically or horizontally:</p>
<p><strong>Vertical scaling</strong> in a J2EE application involves adding additional servers running on the same machine. With vertical scaling, the machine&#8217;s processing power, CPU usage, and JVM heap memory configurations are the main factors in deciding how many server instances should be run on one machine (also known as the server-to-CPU ratio).</p>
<p><strong>Horizontal scaling</strong> involves adding more machines to the cluster, thus increasing the overall system capacity.</p>
<p>Vertical scaling typically does not have an impact on the architecture, but the architecture must be created with special considerations for a horizontal scaling.</p>
<h2>Reliability</h2>
<p>Reliability ensures the integrity and consistency of the application and all its transactions.</p>
<p>As the load increases on your system, your system must continue to process requests and handle transactions as accurately as it did before the load increased.</p>
<h2>Availability</h2>
<p>Availability ensures that a service/resource is always accessible. By setting up an environment of redundant components and failover, an individual component can fail and have a negative impact on reliability, but the service is still available due to the redundancy.</p>
<p><strong>Load balancing</strong> (and Failover) is a mechanism where the server load is distributed to different nodes within the server cluster, based on a load balancing policy. There are many different algorithms to define the load distribution policy, ranging from a simple round robin algorithm to more sophisticated algorithms like minimum load, weight-based, last access time etc.</p>
<p>Two popular methods of load balancing in a cluster are DNS round robin and hardware load balancing. DNS round robin provides a single logical name, returning any IP address of the nodes in the cluster. This option is inexpensive, simple, and easy to set up, but it doesn&#8217;t provide any server affinity or high availability. In contrast, hardware load balancing offers virtual IP addressing. Here, the load balancer shows a single IP address for the cluster, which maps the addresses of each machine in the cluster. The load balancer receives each request and rewrites headers to point to other machines in the cluster. If we remove any machine in the cluster, the requests are still served seamlessly. Hardware load balancing has obvious advantages in terms of server affinity and high availability.</p>
<h2>Extensibility</h2>
<p>Extensibility is the ability to add additional functionality or modify existing functionality without impacting existing system functionality. You should consider the following when you create the architecture and design to help ensure extensibility: low coupling, interfaces, and encapsulation.</p>
<h2>Maintainability</h2>
<p>Maintainability is the ability to correct flaws in the existing functionality without impacting other components of the system. When creating an architecture and design, you should consider the following to enhance the maintainability of a system: low coupling, modularity, and documentation.</p>
<h2>Manageability</h2>
<p>Manageability deals with system monitoring of the QoS requirements and the ability to change the system configuration to improve the QoS dynamically without changing the system.</p>
<h2>Security</h2>
<p>Security is the ability to ensure that the system cannot be compromised. Security includes not only issues of confidentiality and integrity (SQL injection, URL injection etc), but also relates to Denial-of-Service (DoS) attacks that impact availability. Creating an architecture that is separated into functional components makes it easier to secure the system because you can build security zones around the components. If a component is compromised, then it is easier to contain the security violation to that component.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=33&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/22/notes-on-qos-and-capacity-planning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernate Inheritance</title>
		<link>http://javavibes.wordpress.com/2009/06/22/hibernate-inheritance/</link>
		<comments>http://javavibes.wordpress.com/2009/06/22/hibernate-inheritance/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:37:50 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[java frameworks]]></category>
		<category><![CDATA[hibernate inheritance]]></category>
		<category><![CDATA[table per class]]></category>
		<category><![CDATA[table per concrete class]]></category>
		<category><![CDATA[table per subclass]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=29</guid>
		<description><![CDATA[Hibernate supports different types of inheritance, here we explain it with the help of some examples. Please consider the following structures for the purpose of the examples: Tables: payment_t: pmt_id (PK), amount, paid_by, date_time cash_payment_t: pmt_id (PK), currency credit_payment_t: pmt_id (PK), cc_no, cc_type cheque_payment_t: pmt_id (PK), cheque_no Value objects: Interfaces: PaymentVo Classes: CashPaymentVo CreditCardPaymentVo ChequePaymentVo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=29&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hibernate supports different types of inheritance, here we explain it with the help of some examples. Please consider the following structures for the purpose of the examples:</p>
<p><span style="text-decoration:underline;"><strong>Tables:</strong></span></p>
<p>payment_t: pmt_id (PK), amount, paid_by, date_time</p>
<p>cash_payment_t: pmt_id (PK), currency</p>
<p>credit_payment_t: pmt_id (PK), cc_no, cc_type</p>
<p>cheque_payment_t: pmt_id (PK), cheque_no</p>
<div><span style="text-decoration:underline;"><strong>Value objects:</strong></span></div>
<p><span style="text-decoration:underline;">Interfaces:</span></p>
<p>PaymentVo</p>
<p><span style="text-decoration:underline;">Classes:</span></p>
<p>CashPaymentVo</p>
<p>CreditCardPaymentVo</p>
<p>ChequePaymentVo</p>
<div><span id="more-29"></span></div>
<div></div>
<p>Hibernate supports four types of inheritance mapping:</p>
<div><strong>1. </strong><span style="text-decoration:underline;"><strong>Table per class hierarchy:</strong></span></div>
<p>This can be used if cash_payment_t etc are not separate tables, instead there is a pmt_type (discriminator) column in the payment_t tables that distinguishes the type of payment and all other columns are also part of payment_t</p>
<p>The limitation here is that child-specific columns like cc_type will have to be not-null in the common table.</p>
<p>&lt;class name=&#8221;PaymentVo&#8221; table=&#8221;payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;discriminator column=&#8221;pmt_type&#8221; type=&#8221;string&#8221;/&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;subclass name=&#8221;CreditCardPaymentVo&#8221; discriminator-value=&#8221;CREDIT&#8221;&gt;</p>
<p>&lt;property name=&#8221;ccType&#8221; column=&#8221;cc_type&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;subclass name=&#8221;CashPaymentVo&#8221; discriminator-value=&#8221;CASH&#8221;&gt;</p>
<p>&#8230;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;subclass name=&#8221;ChequePaymentVo&#8221; discriminator-value=&#8221;CHEQUE&#8221;&gt;</p>
<p>&#8230;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;/class&gt;</p>
<div><strong>2. </strong><span style="text-decoration:underline;"><strong>Table per subclass hierarchy:</strong></span></div>
<p>&lt;class name=&#8221;PaymentVo&#8221; table=&#8221;payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;joined-subclass name=&#8221;CreditCardPaymentVo&#8221; table=&#8221;credit_payment_t&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&lt;property name=&#8221;ccType&#8221; column=&#8221;cc_type&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/joined-subclass&gt;</p>
<p>&lt;joined-subclass name=&#8221;CashPaymentVo&#8221; table=&#8221;cash_payment_t&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/joined-subclass&gt;</p>
<p>&lt;joined-subclass name=&#8221;ChequePaymentVo&#8221; table=&#8221;cheque_payment_t&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/joined-subclass&gt;</p>
<p>&lt;/class&gt;</p>
<p>or if there is a discriminator column in the payment table then:</p>
<p>&lt;class name=&#8221;PaymentVo&#8221; table=&#8221;payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;discriminator column=&#8221;pmt_type&#8221; type=&#8221;string&#8221;/&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;subclass name=&#8221;CreditCardPaymentVo&#8221; discriminator-value=&#8221;CREDIT&#8221;&gt;</p>
<p>&lt;join table=&#8221;credit_payment_t&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&lt;property name=&#8221;ccType&#8221; column=&#8221;cc_type&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/join&gt;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;subclass name=&#8221;CashPayment&#8221; discriminator-value=&#8221;CASH&#8221;&gt;</p>
<p>&lt;join table=&#8221;cash_payment_t&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/join&gt;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;subclass name=&#8221;ChequePayment&#8221; discriminator-value=&#8221;CHEQUE&#8221;&gt;</p>
<p>&lt;join table=&#8221;cheque_payment_t&#8221; fetch=&#8221;select&#8221;&gt;</p>
<p>&lt;key column=&#8221;pmt_id&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/join&gt;</p>
<p>&lt;/subclass&gt;</p>
<p>&lt;/class&gt;</p>
<div><strong>3. <span style="text-decoration:underline;">Table per concrete class hierarchy: </span></strong></div>
<p>This is used if each of the child tables define the common columns themselves (i.e. amount is a column in each of the child tables)</p>
<p>Here the parent table payment_t may not be required at all, and if it is not there then the ParentVo can be defined as abstract=&#8221;true&#8221;</p>
<p>&lt;class name=&#8221;PaymentVo&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;union-subclass name=&#8221;CreditCardPaymentVo&#8221; table=&#8221;credit_payment_t&#8221;&gt;</p>
<p>&lt;property name=&#8221;ccType&#8221; column=&#8221;cc_type&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/union-subclass&gt;</p>
<p>&lt;union-subclass name=&#8221;CashPaymentVo&#8221; table=&#8221;cash_payment_t&#8221;&gt;</p>
<p>&#8230;</p>
<p>&lt;/union-subclass&gt;</p>
<p>&lt;union-subclass name=&#8221;ChequePaymentVo&#8221; table=&#8221;cheque_payment_t&#8221;&gt;</p>
<p>&#8230;</p>
<p>&lt;/union-subclass&gt;</p>
<p>&lt;/class&gt;</p>
<div><strong>4. <span style="text-decoration:underline;">Implicit polymorphism hierarchy (with table per concrete class):</span></strong></div>
<p>Here no need to mention the PaymentVo interface in the mapping file</p>
<p>This one is not recommended as it has some limitations&#8230;</p>
<p>&lt;class name=&#8221;CreditCardPaymentVo&#8221; table=&#8221;credit_payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/class&gt;</p>
<p>&lt;class name=&#8221;CashPayment&#8221; table=&#8221;cash_payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/class&gt;</p>
<p>&lt;class name=&#8221;ChequePayment&#8221; table=&#8221;cheque_payment_t&#8221;&gt;</p>
<p>&lt;id name=&#8221;pmtId&#8221; type=&#8221;long&#8221; column=&#8221;pmt_id&#8221;&gt;</p>
<p>&lt;generator/&gt;</p>
<p>&lt;/id&gt;</p>
<p>&lt;property name=&#8221;amount&#8221; column=&#8221;amount&#8221;/&gt;</p>
<p>&#8230;</p>
<p>&lt;/class&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=29&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/22/hibernate-inheritance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
		<item>
		<title>Remove ^M characters from Unix file</title>
		<link>http://javavibes.wordpress.com/2009/06/22/remove-m-characters-from-unix-file/</link>
		<comments>http://javavibes.wordpress.com/2009/06/22/remove-m-characters-from-unix-file/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 07:19:19 +0000</pubDate>
		<dc:creator>harjitdelhi</dc:creator>
				<category><![CDATA[unix tips]]></category>
		<category><![CDATA[Ctrl+M]]></category>
		<category><![CDATA[Ctrl-M]]></category>
		<category><![CDATA[Remove Ctrl-M]]></category>
		<category><![CDATA[Remove ^M]]></category>
		<category><![CDATA[Unix linefeed character]]></category>
		<category><![CDATA[^M]]></category>

		<guid isPermaLink="false">http://javavibes.wordpress.com/?p=24</guid>
		<description><![CDATA[UNIX treats the end of line differently than other operating systems. Sometimes when editing files in both Windows and UNIX environments, a CTRL-M character is visibly displayed at the end of each line as ^M in vi. To remove the ^M characters at the end of all lines in vi, use: :%s/^V^M//g The ^v is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=24&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>UNIX treats the end of line differently than other operating systems. Sometimes when editing files in both Windows and UNIX environments, a CTRL-M character is visibly displayed at the end of each line as ^M in vi.</p>
<p>To remove the ^M characters at the end of all lines in vi, use:</p>
<p><code>:%s/^V^M//g</code></p>
<p>The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like this:</p>
<p><code>:%s/^M//g</code></p>
<p>In UNIX, you can escape a control character by preceding it with a CONTROL-V. The :%s is a basic search and replace command in vi. It tells vi to replace the regular expression between the first and second slashes (^M) with the text between the second and third slashes (nothing in this case). The g at the end directs vi to search and replace globally (all occurrences).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/javavibes.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/javavibes.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/javavibes.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=javavibes.wordpress.com&amp;blog=8253473&amp;post=24&amp;subd=javavibes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://javavibes.wordpress.com/2009/06/22/remove-m-characters-from-unix-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2e808289e23a9773be2443c414279815?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">harjit</media:title>
		</media:content>
	</item>
	</channel>
</rss>
