<?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>vignesh&#039;s Blog</title>
	<atom:link href="http://vigneshbhupathi.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vigneshbhupathi.wordpress.com</link>
	<description>Sun Certification</description>
	<lastBuildDate>Tue, 07 Jun 2011 06:15:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vigneshbhupathi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>vignesh&#039;s Blog</title>
		<link>http://vigneshbhupathi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vigneshbhupathi.wordpress.com/osd.xml" title="vignesh&#039;s Blog" />
	<atom:link rel='hub' href='http://vigneshbhupathi.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Garbage Collection</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/06/01/garbage-collection/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/06/01/garbage-collection/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 21:21:16 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Garbage collection java]]></category>
		<category><![CDATA[GC]]></category>
		<category><![CDATA[minor and major collection]]></category>
		<category><![CDATA[perm]]></category>
		<category><![CDATA[tenured]]></category>
		<category><![CDATA[young generation]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=190</guid>
		<description><![CDATA[When we create any object using new keyword, some amount of memory will be allocated. Once we done with that object, it should be removed from the memory. Java implements automatic memory management also known as Garbage collection. It will automatically recycle the dynamically allocated memory. Garbage collector will recycle the memory. Garbage collection was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=190&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When we create any object using <strong>new</strong> keyword, some amount of memory will be allocated. Once we done with that object, it should be removed from the memory. Java implements automatic memory management also known as Garbage collection. It will automatically recycle the dynamically allocated memory. Garbage collector will recycle the memory.</p>
<p>Garbage collection was first invented by John McCarthy in 1958 as part of the implementation of Lisp..</p>
<p>Garbage collection organizes objects into generations (<span style="color:#333399;">Young, Tenured and Perm</span>)..<span id="more-190"></span><br />
The <strong><em>young</em></strong> generation consists of <strong><em>eden</em></strong><em> </em>plus two <strong><em>survivor</em></strong><em> </em>spaces .Objects are initially allocated in eden. One <em>survivor</em> space is empty at any time, and serves as a destination of the next, copying collection of any live objects in eden and the other survivor space. Objects are copied between survivor spaces in this way until they are old enough to be tenured, or copied to the <strong><em>tenured</em></strong> generation.</p>
<p>The <strong><em>permanent </em></strong><em>generation </em>is special because it holds data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level .For example objects describing classes and methods are stored in the <em>permanent generation</em>.</p>
<p><span style="color:#333399;">The garbage collection can be of 2 types namely:</span></p>
<ul>
<li>Major</li>
<li>Minor</li>
</ul>
<p>When the <em>young</em> generation fills up it causes a <em>minor collection. </em>Minor collections can be optimized assuming a high infant mortality rate.</p>
<p>A <em>young</em> generation full of dead objects is collected very quickly. Some surviving objects are moved to a <em>tenured </em>generation. When the <em>tenured</em> generation needs to be collected there is a <em>major collection</em> that is often much slower because it involves all live objects.</p>
<p><strong>Performance considerations:</strong></p>
<p><strong>*Throughput</strong>: Percentage of time not spent in GC over a long period of time.<br />
<strong>*Pauses</strong>: Application unresponsive during GC<br />
<strong>*FootPrint</strong> : working set of a process, measured in pages and cache lines.<br />
<strong><em>*Promptness</em></strong><em>: </em>time between when an object becomes dead and when the memory becomes available</p>
<p><a href="http://vigneshbhupathi.files.wordpress.com/2010/06/garbage_collection4.jpg"><img class="aligncenter size-full wp-image-193" title="Garbage_Collection" src="http://vigneshbhupathi.files.wordpress.com/2010/06/garbage_collection4.jpg?w=500&#038;h=706" alt="" width="500" height="706" /></a></p>
<p><span style="color:#333399;">Where we can apply or consider about these above terms?</span></p>
<p>Lets take an example .Consider the metric for web server application to be Throughput, since Pauses during GC may be tolerable, or simple obscured by network latencies. However, if its an gaming application or interactive graphics application even short Pauses may affect the user experience..</p>
<p>A very large young generation may maximize the Throughput, but remaining 3 will be at expense.. If Young generation is small, then Pauses will be minimized but at the expense of Throughput. We can determine the necessary generation based on the user requirement and the application the way it uses the memory..</p>
<p><span style="color:#333399;">How do we measure?</span></p>
<p>Throughput of web server – can be tested using load generator<br />
Footprint – in Solaris pmap command<br />
Pauses – diagnostic output of virtual machine..</p>
<p><strong> Diagram : </strong></p>
<p><strong> </strong></p>
<p><strong>Sizing the Generations</strong></p>
<ul>
<li>The <code>-Xmx</code> value determines the size of the heap to reserve at JVM initialization.</li>
<li>The <code>-Xms</code> value is the space in memory that is committed to the VM at init. The JVM can grow to the size of <code>-Xmx</code>.</li>
</ul>
<p><strong>Total Heap: </strong></p>
<ul>
<li>Total available memory is the most important factor affecting GC performance</li>
<li>· By default the JVM grows or shrinks the heap at each GC to keep the ratio of free space to live objects at each collection within a specified range.</li>
</ul>
<ul>
<li><code>-XX:MinHeapFreeRatio</code> &#8211; when the percentage of free space in a generation falls below this value the generation will be expanded to meet this percentage. Default is 40</li>
<li><code>-XX:MaxHeapFreeRatio</code> &#8211; when the percentage of free space in a generation exceeded this value the generation will shrink to meet this value. Default is 70</li>
</ul>
<p><strong>Young Generation Guarantee</strong></p>
<ul>
<li>The <code>-XX:SurvivorRatio</code> option can be used to tune the number of survivor spaces.</li>
<li>Not often important for performance
<ul>
<li><code>-XX:SurvivorRatio=6</code> &#8211; each survivor space will be 1/8 the young generation</li>
<li>If survivor spaces are too small copying collection overflows directly into the tenured generation.</li>
<li>Survivor spaces too large uselessly empty</li>
<li><code>-XX:+PrintTenuringDistribution</code> &#8211; shows the threshold chosen by JVM to keep survivors half full, and the ages of objects in the new generation.</li>
</ul>
</li>
<li>Server Applications
<ul>
<li>First decide the total amount of memory you can afford to give the virtual machine. Then graph your own performance metric against young generation sizes to find the best setting.</li>
<li>Unless you find problems with excessive major collection or pause times, grant plenty of memory to the young generation.</li>
<li>Increasing the young generation becomes counterproductive at half the total heap or less (whenever the young generation guarantee cannot be met).</li>
<li>Be sure to increase the young generation as you increase the number of processors, since allocation can be parallelized.</li>
</ul>
</li>
</ul>
<p><strong>Types of Collectors</strong></p>
<ul>
<li>Everything to this point talks about the default garbage collector, there are other GC&#8217;s you can use</li>
<li>Throughput Collector &#8211; Uses a parallel version of the young generation collector
<ul>
<li><code>-XX:+UseParallelGC</code></li>
<li>Tenured collector is the same as in default</li>
</ul>
</li>
<li>Concurrent Low Pause Collector
<ul>
<li>Collects tenured collection concurrently with the execution of the app.</li>
<li>The app is paused for short periods during collection</li>
<li><code>-XX:+UseConcMarkSweepGC</code></li>
<li>To enable a parallel young generation GC with the concurrent GC add <code>-XX:+UseParNewGC</code> to the startup. Don&#8217;t add <code>-XX:+UseParallelGC</code> with this option.</li>
</ul>
</li>
</ul>
<p><span style="color:#333399;"><span style="text-decoration:underline;">Recommend to study this :<br />
</span></span><a href="http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html">http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html</a></p>
<p><span style="color:#333399;"><span style="text-decoration:underline;">Java HotSpot VM Options<br />
</span></span>http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp</p>
<p><span style="color:#333399;"><span style="text-decoration:underline;">Examples with explanation:<br />
</span></span>http://www.javapassion.com/handsonlabs/javaperf/index.html</p>
<p><span style="color:#333399;"><span style="text-decoration:underline;">Netbeans Profiler with screenshot:<br />
</span></span>http://www.javapassion.com/handsonlabs/nbprofilermemory/index.html</p>
<p><span style="color:#333399;"><span style="text-decoration:underline;">MemoryLeak :<br />
</span></span><a href="http://netbeans.org/kb/articles/nb-profiler-uncoveringleaks_pt1.html">http://netbeans.org/kb/articles/nb-profiler-uncoveringleaks_pt1.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=190&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/06/01/garbage-collection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>

		<media:content url="http://vigneshbhupathi.files.wordpress.com/2010/06/garbage_collection4.jpg" medium="image">
			<media:title type="html">Garbage_Collection</media:title>
		</media:content>
	</item>
		<item>
		<title>SCEA Part -1</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/05/03/scea-part-1/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/05/03/scea-part-1/#comments</comments>
		<pubDate>Mon, 03 May 2010 17:14:03 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Sun Certification]]></category>
		<category><![CDATA[310-052]]></category>
		<category><![CDATA[SCEA]]></category>
		<category><![CDATA[SCEA 5]]></category>
		<category><![CDATA[Sun Enterprise Architect]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=184</guid>
		<description><![CDATA[I would like to thank this Forum for the precious information I got from it as well as to Mikalai Zaikin as well as to Java Ranchers.. I would like to share my experience and materials which I have used for SCEA preparation..Firstly, I am having 2 yr 10 months experience. Those who are having [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=184&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would like to thank this <a title="Javaranch" href="http://www.coderanch.com/forums/f-26/java-Architect-SCEA" target="_blank">Forum </a>for the precious  information I got from it as well as to <strong>Mikalai Zaikin</strong> as well  as to <strong><a title="A  Friendly Place for Java Greenhorns" href="http://www.javaranch.com/" target="_new">Java</a> Ranchers</strong>..</p>
<p>I  would like to share my experience and materials which I have used for  SCEA preparation..Firstly, I am having<strong> 2 yr</strong> 10 months experience. Those who  are having exp less than 4 yrs ,I would suggest them to finish these  certifications (SCWCD, SCBCD &amp; SCDJWS for J2EE 5) , though it’s not  mandatory, but it helps you to gain more knowledge. If you are 5 + exp,  then its easy to clear this exam..Exam contains only scenario based questions and we need to select  an appropriate answer. It’s quite <strong>difficult </strong>for me, to choose  those answers :&#8217;( .  Don’t go for most powerful and new ones instead read the question  carefully and address the requirements. For example, sometime two-tier  architecture will be better than 3-tier, DAO over JPA, RMI over web  services (it depends on our requirements )..<br />
<span id="more-184"></span></p>
<p><strong>How long did you prepare for this exam?</strong><br />
I am not brilliant, little bit dumb fellow  <img src="http://www.coderanch.com/images/smilies/jr-banghead.gif" border="0" alt="" /> , so I took hardly 4-5 months..</p>
<p><strong>Below topics </strong>are very important (If you want to be an architect,  you must know about these topics in depth) . I got most of the questions from these topics..</p>
<ul>
<li><strong>Business Tier Technologies(EJB,JPA):</strong> Cleared <a rel="nofollow" href="http://www.coderanch.com/t/471102/java-EJB-SCBCD/certification/SCBCD-Cleared" target="_new">SCBCD 5</a></li>
</ul>
<ul>
<li><strong>Web services(JAXWS,SOAP,UDDI,JAXB):</strong> Cleared <a rel="nofollow" href="http://www.coderanch.com/t/459684/java-Web-Services-SCDJWS/certification/SCDJWS-Cleared" target="_new">SCDJWS 5</a>.</li>
</ul>
<ul>
<li> <strong>Web Tier Technologies(Servlet,JSP):</strong> Cleared <a rel="nofollow" href="../2009/09/05/scwcd/" target="_new">SCWCD 5 </a> ..</li>
</ul>
<ul>
<li><strong>Design pattern :</strong> I read &#8220;Design Patterns&#8221;, GoF , Core J2EE  Patterns, 2nd ed , Java Design Patterns &amp; Examples(Author: Pawan  Modi). I took nearly 1 month to complete this 3 books and forget  completely within an week <img src="http://www.coderanch.com/images/smilies/jr-confused.gif" border="0" alt="" /> .. So I would urge you to take notes (about pros &amp; cons) and  implement those patterns so that you will remember.. Please don’t  memorize, understand why we need that pattern and try to  describe each pattern in a single line.. If you are able to do that,  then go for next chapter.</li>
</ul>
<ul>
<li><strong>JCA ,JMX ,JSF</strong> &#8211; I don’t have much exposure on this ,only  theory knowledge ..</li>
</ul>
<p style="padding-left:30px;">
<ul>
<li><strong>CORBA,IIOP , RMI JRMP, Java IDL </strong>-I studied CORBA in College  (had few ppts to revise), implemented Java IDL.</li>
</ul>
<p style="padding-left:30px;">
<ul>
<li><strong>Cryptography alg– MD5,SHA1,Diffie-Hellman, DES </strong> (I have  implemented this algorithms in C while in College , we had separate  paper for cryptography )</li>
</ul>
<p style="padding-left:30px;">
<ul>
<li><strong>Message Digest ,Digital signature,One-Way Hash Function, Digital  Certificates, Asymmetric Ciphers</strong> &#8211; I have implemented this in my  first project (Channel level as well as message level secuirty using  https – web services(signing the soap msg) – CA signed jar &#8230;.</li>
</ul>
<p style="padding-left:30px;">
<ul>
<li><strong> SSO:</strong> – I have implemented Cross-domain SSO in my second  project ..So I have fair idea about this federation concept using Sun  Access Manager as well as using Siteminder..</li>
</ul>
<ul>
<li> <strong>Security:</strong> I have basic knowledge on hacking stuffs as well  as on JAAS,JSSE  .. SQL injection, Cross site scripting, Denial of  Service (DoS), Weak Encryption, Buffer Overflow,  Man in middle (We have  learned these topics while in College)…</li>
</ul>
<p><strong>Material which I have used?</strong></p>
<p><strong><span style="text-decoration:underline;">Objectives:</span></strong><br />
<a rel="nofollow" href="http://in.sun.com/training/catalog/courses/CX-310-052.xml" target="_blank">http://in.sun.com/training/catalog/courses/CX-310-052.xml</a></p>
<p><strong><span style="text-decoration:underline;"><a title="JavaRanch FAQ" rel="nofollow" href="http://faq.javaranch.com/java/SceaFaq" target="_new">SCEAFaq</a>:</span></strong><br />
<a rel="nofollow" href="http://faq.javaranch.com/java/SceaLinks" target="_blank">http://faq.javaranch.com/java/SceaLinks</a></p>
<p><strong><span style="text-decoration:underline;">Books for SCEA Exam</span></strong></p>
<p><strong>Mikalai Zaikin’s notes</strong> &#8211; Thanks a ton<br />
<a rel="nofollow" href="http://java.boot.by/scea5-guide/" target="_blank">http://java.boot.by/scea5-guide/</a><br />
Updated version, we can find here :<br />
<a rel="nofollow" href="http://www.scribd.com/doc/25297376/J2EE-5-Architect-Exam-Study-Guide" target="_blank">http://www.scribd.com/doc/25297376/J2EE-5-Architect-Exam-Study-Guide</a><br />
<strong>Chapter wise – book detail (thanks to prathap venkata )</strong><br />
<a rel="nofollow" href="http://www.coderanch.com/t/474062/java-Architect-SCEA/certification/books-new-scea-exam" target="_blank">http://www.coderanch.com/t/474062/java-Architect-S&#8230;tification/books-new-scea-exam</a><br />
<strong>IBM’s Java certification success</strong><br />
<a rel="nofollow" href="http://www.scribd.com/doc/7317384/Java-Certification-SCEA" target="_blank">http://www.scribd.com/doc/7317384/Java-Certification-SCEA</a><br />
<strong>Java EE from SUN :</strong><br />
<a rel="nofollow" href="http://download.oracle.com/javaee/5/tutorial/doc/" target="_blank">http://download.oracle.com/javaee/5/tutorial/doc/</a></p>
<p><strong><span style="text-decoration:underline;">Notes: </span></strong><br />
<a rel="nofollow" href="http://www.coderanch.com/t/149662/Architect-Certification-SCEA/certification/My-SCEA-Part-Study-Notes" target="_blank">http://www.coderanch.com/t/149662/Architect-Certif&#8230;ation/My-SCEA-Part-Study-Notes</a></p>
<p><strong><span style="text-decoration:underline;">Blogs : </span></strong><br />
<a rel="nofollow" href="http://javaxcross.blogspot.com/2008/03/how-to-pass-scea-5.html" target="_blank">http://javaxcross.blogspot.com/2008/03/how-to-pass-scea-5.html</a><br />
<a rel="nofollow" href="http://jeemind.blogspot.com/2010/04/scea-cx-310-052-simulator.html" target="_blank">http://jeemind.blogspot.com/2010/04/scea-cx-310-052-simulator.html</a><br />
<a rel="nofollow" href="http://www.javabeat.net/cert/scea/mock-exam/scea-mock-exam-questions-10.php" target="_blank">http://www.javabeat.net/cert/scea/mock-exam/scea-mock-exam-questions-10.php</a> (Mock exam)</p>
<p><strong><span style="text-decoration:underline;">Design pattern :</span></strong><br />
<a rel="nofollow" href="http://www.javacamp.org/designPattern/index.html" target="_blank">http://www.javacamp.org/designPattern/index.html</a><br />
<a rel="nofollow" href="http://sourcemaking.com/design_patterns/flyweight/java/4" target="_blank">http://sourcemaking.com/design_patterns/flyweight/java/4</a><br />
<a rel="nofollow" href="http://www.java2s.com/Code/Java/Design-Pattern/CatalogDesign-Pattern.htm" target="_blank">http://www.java2s.com/Code/Java/Design-Pattern/CatalogDesign-Pattern.htm</a><br />
Liskov Substitution Principle/ Designing Abstraction/ Dependency  Inversion Principle<br />
<a rel="nofollow" href="http://javaboutique.internet.com/tutorials/JavaOO/" target="_blank">http://javaboutique.internet.com/tutorials/JavaOO/</a></p>
<p><strong><span style="text-decoration:underline;">Security:</span></strong></p>
<p><strong>JavaRanch: </strong><br />
<a rel="nofollow" href="http://faq.javaranch.com/java/SecurityFaq" target="_blank">http://faq.javaranch.com/java/SecurityFaq</a><br />
JavaEE tutorial , Security chapter .. <a rel="nofollow" href="http://java.sun.com/javaee/5/docs/tutorial/doc/JavaEETutorial.pdf" target="_blank">http://download.oracle.com/javaee/5/tutorial/doc/javaeetutorial5.pdf</a><br />
<strong> Cyp: Basics </strong><br />
<a rel="nofollow" href="http://www.javapassion.com/j2ee/SecurityBasics.pdf" target="_blank">http://www.javapassion.com/j2ee/SecurityBasics.pdf</a><br />
<strong> Web security:</strong><br />
<a rel="nofollow" href="http://www.javapassion.com/j2ee/WebApplicationSecurity.pdf" target="_blank">http://www.javapassion.com/j2ee/WebApplicationSecurity.pdf</a><br />
<strong>Threats:</strong><br />
<a rel="nofollow" href="http://www.javapassion.com/j2ee/WebSecurityThreats.pdf" target="_blank">http://www.javapassion.com/j2ee/WebSecurityThreats.pdf</a><br />
<strong> X509: </strong><br />
<a rel="nofollow" href="http://www.mayrhofer.eu.org/Default.aspx?pageindex=4&amp;pageid=39" target="_blank">http://www.mayrhofer.eu.org/Default.aspx?pageindex=4&amp;pageid=39</a></p>
<p><strong><span style="text-decoration:underline;">Servicelocator Vs Ejb 3 injection:</span></strong><br />
<a rel="nofollow" href="http://www.javalobby.org/articles/service-locator/" target="_blank">http://www.javalobby.org/articles/service-locator/</a></p>
<p><strong><span style="text-decoration:underline;">DOA Issue :</span></strong><br />
<a rel="nofollow" href="http://www.coderanch.com/t/458380/Architect-Certification-SCEA/certification/DOA-as-session-bean#2046792" target="_blank">http://www.coderanch.com/t/458380/Architect-Certif&#8230;on/DOA-as-session-bean#2046792</a></p>
<p><strong><span style="text-decoration:underline;">Obsolete Design Patterns for EJB3 &amp; SCEA 5 :</span></strong><br />
<a rel="nofollow" href="http://www.coderanch.com/t/156191/Architect-Certification-SCEA/certification/Obsolete-Design-Patterns-EJB-SCEA" target="_blank">http://www.coderanch.com/t/156191/Architect-Certif&#8230;olete-Design-Patterns-EJB-SCEA</a></p>
<p>Please drop a comment , I would like to help &amp; share notes with all.. </p>
<p>All the best  <img src="http://www.coderanch.com/images/smilies/e8a506dc4ad763aca51bec4ca7dc8560.gif" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=184&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/05/03/scea-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>

		<media:content url="http://www.coderanch.com/images/smilies/jr-banghead.gif" medium="image" />

		<media:content url="http://www.coderanch.com/images/smilies/jr-confused.gif" medium="image" />

		<media:content url="http://www.coderanch.com/images/smilies/e8a506dc4ad763aca51bec4ca7dc8560.gif" medium="image" />
	</item>
		<item>
		<title>Java /J2ee interview preparation</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/04/07/java-j2ee-interview-preparation/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/04/07/java-j2ee-interview-preparation/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 16:47:16 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Interview]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[J2ee interview]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=175</guid>
		<description><![CDATA[Preparation tips &#38; links: (for 1st round interview) –Basic stuffsss …. More to add on… All d best!!! *) Basic flow architecture of java – Read abt JVM, why we need JRE, Where we will be using JIT, CLASSLOADER workflow.. *) We should be good in core java concepts.. I would prefer to read Kathy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=175&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Preparation tips &amp; links: (for 1st round interview) –Basic stuffsss ….  More to add on… All d best!!!</p>
<p>*)  Basic flow architecture of java – Read abt JVM, why we need JRE, Where we will be using JIT, CLASSLOADER workflow..</p>
<p>*) We should be good in core java concepts.. I would prefer to read Kathy serria (SCJP book).. Its not mandatory to take this SCJP exam, but its better to read this book atleast once and be familiar with all the topic.. Concentrate more on Threads,Generics &amp; Collections (especially HashMap implementation).. I would urge you to code as much as possible.. Understand HashCode concept, implement a simple HashMap (what will happen if collision occurs in HashMap) , LoadFactor, rehash ,running time complexity(O(1)) ..  Please check the source code of HashMap.java</p>
<p>*) Annotation – how to create a simple annotation (@Retention(RetentionPolicy.RUNTIME))<span id="more-175"></span></p>
<p>*) Task Scheduling Framework – [Executor &amp; Future , Concurrent.* package ]</p>
<p>*) Interview questions – Arul kumaran (Search in Google, it’s a free source).. Read all the questions…</p>
<p>*) Design patterns… Please be familiar with 5-6 common pattern.. Singleton, Factory, Abstract Factory, Observable &amp; Observer…<br />
J2EE pattern – we should know basic things [ ServiceLocator , BussinessDelegate, DAO, SessionFacade ,FrontController ,Interceptor ]</p>
<p>http://www.javacamp.org/designPattern/</p>
<p>http://www.java2s.com/Code/Java/Design-Pattern/CatalogDesign-Pattern.htm</p>
<p>*) I have shared some more interview questions : <a title="Interview" href="../category/interview/" target="_blank">here</a></p>
<p><strong>*) JSP:</strong></p>
<p>- Jsp life cycle<br />
- Declaration &lt;%! %&gt;-understand the significance of !..  &lt;%! String name=”vignesh”; %&gt; is an instance variable declared outside    _jspService()  whereas &lt;% String name=”vignesh”; %&gt; is a local  variable declared inside _jspService().<br />
-Jsp page directive (import,isErrorPage,extends)<br />
-Implicit variables (request,response,session,page ..etc)<br />
- Custom Tag<br />
- Difference between &lt;%@include&gt;<br />
<strong><br />
*) Servlet: </strong><br />
- GenericServlet, Servlet (check whether its a interface or class or abstract class).. Understand the core flow.. It sounds better, if we analyze these things..<br />
- Life cycle<br />
- ServletContext &amp; ServletConfig (Imp)<br />
- Cookie, UrlRewriting , session<br />
- RequestDispatcher.forward() Vs HttpServletRe sponse.sendRedirect()<br />
·         forward- handled on server side. Transparent to browser<br />
·         redirect &#8211; sends redirect message to the browser<br />
- Session affinity and sticky session in context of load balancing servers<br />
- Understand about Http protocol<br />
-  Filter, Listener</p>
<p><span style="text-decoration:underline;"><strong>Must read links:</strong></span></p>
<p><strong>J2EE-Clustering : <a href="http://www.theserverside.com/news/1364410/Under-the-Hood-of-J2EE-Clustering" target="_blank">here</a><br />
</strong></p>
<p><strong>Memory(OS memory + heap memory + outOfMemoryError) : <a href="http://www.ibm.com/developerworks/java/library/j-nativememory-linux/" target="_blank">here</a><br />
</strong></p>
<p><strong>Object creation in GC:</strong> <a href="http://www.coderanch.com/t/479816/Programmer-Certification-SCJP/certification/object-creation-GC" target="_blank">here</a></p>
<p><strong>Java Anti-Patterns :</strong> <a href="http://www.odi.ch/prog/design/newbies.php" target="_blank">here</a></p>
<p><strong>Supercharging your HashMaps &amp; Pagination using JDBC and JSP: Both are discussed very briefly, one should understand abt this : <a href="http://www.javaranch.com/journal/2008/08/Journal200808.jsp" target="_blank">here</a></strong></p>
<p><strong>Tuning Garbage Collection: (Must read and should know about young n tenured collection)</strong> <a href="http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html" target="_blank">here</a></p>
<p><strong>String or Stringbuffer used as a key in HashMap .Which one is better:</strong> <a href="http://www.coderanch.com/t/410559/Beginning-Java/java/Difference-between-Object-s-equals" target="_blank">here</a></p>
<p><strong>Reference (Strong,Weak,soft,Phantom) : <a href="http://www.ibm.com/developerworks/library/j-refs/" target="_blank">here</a></strong></p>
<p><strong>How https can be used to maintain session state</strong>:<a href="http://www.coderanch.com/t/154752/Architect-Certification-SCEA/certification/https-session-state" target="_blank">here</a></p>
<p><strong>Load balancing:</strong> <a href="http://onjava.com/pub/a/onjava/2001/09/26/load.html" target="_blank">here</a></p>
<p><strong>Class format:</strong> <a href="http://en.wikipedia.org/wiki/Class_%28file_format%29" target="_blank">here</a></p>
<p><strong>Filter:</strong><a href="http://java.sun.com/products/servlet/Filters.html" target="_blank">here</a></p>
<p><strong>Servlet:</strong> <a href="http://faq.javaranch.com/java/ServletsFaq" target="_blank">here</a></p>
<p><strong>Javap:</strong> <a href="http://www.javaranch.com/journal/200408/ScjpTipLine-javap.html" target="_blank">here</a></p>
<p>Please leave your comments , so that I can add more ques <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ..</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=175&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/04/07/java-j2ee-interview-preparation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>StartUp Product Comp &#8211; Java/J2ee Interview</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/03/14/startup-product-comp-javaj2ee-interview/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/03/14/startup-product-comp-javaj2ee-interview/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 17:30:32 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Interview]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[J2ee interview]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=169</guid>
		<description><![CDATA[I would like to share my interview exp with a Startup product company.. I have answered all the questions ,expect only one question.. Cleared the first round&#8230; I need to give demo on Spring,struts,hibernate by sharing my desktop.. I love this project, its about cloud computing and mainly virtualization as well as its going to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=169&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would like to share my interview exp with a Startup product company.. I have answered all the questions ,expect only one question.. Cleared the first round&#8230; I need to give demo on Spring,struts,hibernate by sharing my desktop..</p>
<p>I love this project, its about cloud computing and mainly virtualization as well as its going to be competitor to big companies..<span id="more-169"></span><strong> </strong></p>
<p><span style="text-decoration:underline;"><strong>First round :</strong></span></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p>*Tell about myself and about project<br />
*project related questions , so many questions related to web services &amp; its security level<br />
*comparable &amp; comparator<br />
*Jsp &#8211; life cycle<br />
*Web.xml &#8211; elements<br />
*Wsdl- how to validate<br />
*wsdl explanation -with elements (types,message,portType,binding,Service)<br />
*wsdl -Soap binding -Document &amp; rpc<br />
*replicating the values in clusters<br />
*web services &#8211; jax rpc<br />
*Jax Ws<br />
*continuous integration &#8211; maven to bundle,checkStyle to check,PMD validation and finally deployment<br />
*maven &amp; ant<br />
*classloader , war loader<br />
*common jar between two war,how to share that jar to those war file.. Meta-inf &#8211; Manifest file<br />
*autoboxing &amp; var args ..said abt println method in c, hw its copied from C program to java..I have explained in depth(C &#8211; flow)<br />
*strategy pattern -didn&#8217;t answer this question <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
*session facade , business delegate,dao pattern<br />
*factory pattern<br />
*abstract class &#8211; y we need to use and whr we will use<br />
*ORM &#8211; hibernate , hibernate typical properties<br />
*Sax,Dom,STAX,JAXB<br />
*Channel level &amp; message level security<br />
*how will you manage session in web service<br />
*https &amp; http<br />
*Dcache -replicating in clusters , in memory handler<br />
*struts &#8211; Dynamic action<br />
*scope of form type in struts<br />
*tilesplugin<br />
*Transaction &#8212; two phase commit protocol<br />
*ReadWrite &#8211; Isolation<br />
*Axis ..<br />
*AJAX &#8211; xmlhttprequest,jmaki,GWT<br />
*Dependency Injection<br />
*Aspect oriented programming<br />
*how to sort ArrayList using comparator (Collections)..<br />
*Junit &#8211; TestCases,Suite<br />
*Annotation -Retention Policy<br />
*Log4j -adapter,Layout<br />
*JNDI<br />
*UML &#8211; Aggregation ,Association<br />
*Unix &#8211; shell &amp; system programming<br />
*Abt cloud computing,,,<br />
*Virtualization</p>
<p>More to add on&#8230;. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=169&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/03/14/startup-product-comp-javaj2ee-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Behind firewall- Crawl a web page</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/02/23/behind-firewall-crawl-web-page/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/02/23/behind-firewall-crawl-web-page/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:17:06 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[behind firewall]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[install_opener]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[urllib2]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=165</guid>
		<description><![CDATA[This below program helps to crawl a web page,especially if we are behind the firewall.. Proxy.py import urllib2 #Browser proxy setting proxy_info = { &#8216;user&#8217; : &#8216;vignesh_v&#8217;, &#8216;pass&#8217; : &#8216;passwd&#8217;, &#8216;host&#8217; : &#8220;10.16.65.13&#8243;, &#8216;port&#8217; : 80 } # build a new opener that uses a proxy requiring authorization proxy_support = urllib2.ProxyHandler({&#8220;http&#8221; : \ &#8220;http://%(user)s:%(pass)s@%(host)s:%(port)d&#8221; % [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=165&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This below program helps to crawl a web page,especially if we are behind the firewall..</p>
<p><span style="text-decoration:underline;"><strong>Proxy.py</strong></span></p>
<p>import urllib2<br />
#Browser proxy setting<br />
proxy_info = {<br />
&#8216;user&#8217; : &#8216;vignesh_v&#8217;,<br />
&#8216;pass&#8217; : &#8216;passwd&#8217;,<br />
&#8216;host&#8217; : &#8220;10.16.65.13&#8243;,<br />
&#8216;port&#8217; : 80<br />
}</p>
<p># build a new opener that uses a proxy requiring authorization<br />
proxy_support = urllib2.ProxyHandler({&#8220;http&#8221; : \<br />
&#8220;http://%(user)s:%(pass)s@%(host)s:%(port)d&#8221; % proxy_info})<br />
opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler)<br />
# Install the opener<br />
urllib2.install_opener(opener)<br />
#Open the url<br />
f = urllib2.urlopen(&#8216;http://www.python.org/&#8217;)<br />
print f.headers<br />
print f.read()</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=165&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/02/23/behind-firewall-crawl-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Web.py ..</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/02/23/web-py/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/02/23/web-py/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:08:24 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python web]]></category>
		<category><![CDATA[python web module]]></category>
		<category><![CDATA[sqlite3]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[web.py]]></category>
		<category><![CDATA[web.template.render]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=158</guid>
		<description><![CDATA[Python has inbulit sqlite3 db..This below program will create a table in sqlite3 and insert a record and will retrieve the data.We use Web.py module to display the data in a html file.Web.py module has inbuilt server which will deploy this html.. Please install this webpy module Note: User have to align the below code.. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=158&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Python has inbulit sqlite3 db..This below program will create a table in sqlite3 and insert a record and will retrieve the data.We use Web.py module to display the data in a html file.<a href="http://webpy.org/">Web.py</a> module has inbuilt server which will deploy this html..</p>
<p>Please install this <a href="http://webpy.org/static/web.py-0.33.tar.gz">webpy module</a></p>
<p><span style="text-decoration:underline;"><strong>Note: </strong></span>User have to align the below code..</p>
<p><span style="text-decoration:underline;"><strong>SmsAppMain.py</strong></span></p>
<p><strong> </strong>#imports the web.py module<br />
import web<br />
#Import inbulit sqlite db<br />
import sqlite3</p>
<p>#Creating the connection<br />
global connection<br />
connection = sqlite3.connect(&#8216;smsapp.db&#8217;)<br />
#Load the cursor<br />
global cursor<br />
cursor = connection.cursor()</p>
<p>def createUser():<br />
#Create the usertbl<br />
cursor.execute(&#8221;&#8217;create table usertbl(username text,passwd text)&#8221;&#8217;)<br />
print &#8216;Created Usertbl&#8217;<br />
# Insert a row of data<br />
cursor.execute(&#8220;&#8221;"insert into usertbl values (&#8216;viggi&#8217;,'test&#8217;)&#8221;"&#8221;)<br />
# Save the changes<br />
connection.commit()</p>
<p>def retrieveUser(name):<br />
import sqlite3 as db<br />
db = web.database(dbn=&#8221;sqlite&#8221;,db=&#8221;smsapp.db&#8221;)<br />
#Get a reference to the connection object via the cursor<br />
connection = db._db_cursor().connection<br />
cursor.execute(&#8216;select * from usertbl&#8217;)<br />
for element in cursor:<br />
strUser = element<br />
return strUser</p>
<p>#look for templates in your templates directory<br />
render = web.template.render(&#8216;templates/&#8217;)</p>
<p>#Regex that matches a URL,like /,/help<br />
urls = (&#8220;/.*&#8221;, &#8220;SmsAppMain&#8221;)</p>
<p>#Class with GET function<br />
class SmsAppMain:<br />
def GET(self):<br />
name = &#8216;Viggi&#8217;<br />
#createUser()<br />
strUser = retrieveUser(name)<br />
#index is the name of the template<br />
return render.index(str(strUser))</p>
<p>if __name__ == &#8220;__main__&#8221;:<br />
#Create an application with the URLs<br />
#looking up the classes in the global namespace<br />
app = web.application(urls, globals())<br />
app.run()</p>
<p><strong><span style="text-decoration:underline;">index.htm:</span></strong></p>
<p>$def with (name)<br />
$if name:<br />
hello to $name.<br />
$else:<br />
Hello, dumb</p>
<p>Create the templates folder and copy this index.htm&#8230;<br />
cmd :<strong> python SmsAppMain.py</strong></p>
<p>Open a browser and hit this url <strong>http://localhost:8080/index.htm </strong></p>
<p><strong> </strong></p>
<p><strong><br />
<span style="text-decoration:underline;">References : </span></strong></p>
<p><strong> </strong>http://webpy.org/skeleton/0.3</p>
<p>http://docs.python.org/library/sqlite3.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=158&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/02/23/web-py/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Dijkstra&#8217;s algorithm</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/02/05/dijkstras-algorithm/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/02/05/dijkstras-algorithm/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 18:07:10 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[data structure]]></category>
		<category><![CDATA[Dijkstra]]></category>
		<category><![CDATA[Dijkstra's algorithm]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=155</guid>
		<description><![CDATA[Dijkstra&#8217;s algorithm used to solve shortest path problem.. Its used in routing&#8230; For given source vertex(node) in the graph ,the alg will find the shortest path between the vertex and with every other vertex. Ex: Finding shortest route between one city and all other cities.. Alg desc : Entities : Vertices- (nodes) Edges -&#62; links [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=155&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dijkstra&#8217;s algorithm used to solve shortest path problem.. Its used in routing&#8230;</p>
<p>For given source vertex(node) in the graph ,the alg will find the shortest path between the vertex and with every other vertex.</p>
<p>Ex: Finding shortest route between one city and all other cities..<br />
<span id="more-155"></span><br />
Alg desc :<br />
Entities :<br />
Vertices- (nodes)<br />
Edges -&gt; links between vertices</p>
<p>Note : distance between 2 vertex is always positive..</p>
<p>All the vertices in the graph will be consider as unsettled vertices.. so we will maintain two sets (settled and unsettled)..Alg ends once all the vertices are in the settled set.Vertex will be moved to settled set,once its shortest distance has been found.</p>
<p>E -&gt; Stores the shortest distance from the source to each vertex..<br />
D -&gt; store the predecessor of each vertex  on the shortest path from the source..<br />
X -&gt; set of settled vertices, ie the vertices whose shortest distance from d source have been found<br />
F- &gt; unsettled Vertices..</p>
<p>E= $ -&gt; represents infinity<br />
D = () empty set<br />
X = F = () empty set</p>
<p>add vertex to F<br />
E(vertex) =0;<br />
while F is not empty<br />
{<br />
vertex_A =find_minimum(F);<br />
add vertex_A to X ;<br />
find_neighbor(vertex_A);<br />
}</p>
<p>find_minimum(F)<br />
{<br />
find the smallest (as defined by E) vertex in F<br />
remove it from F and return it<br />
}</p>
<p>find_neighbor(shortest_distance )<br />
{<br />
for each vertex_B adjacent to vertex_A, vertex_b not in X<br />
{<br />
if(d(vertex_B) &gt; d(vertex_A) + [vertex_A,vertex_B] //shorter distance exists<br />
{<br />
d(vertex_B) = d(vertex_A) + [vertex_A,vertex_B]<br />
D(vertex_B)=vertex_A<br />
add vertex_B to F<br />
}<br />
}<br />
}</p>
<p>More to add&#8230; soon i will update with an example and their run time as well as desc for complexity of this alg..</p>
<p>Source :</p>
<p>http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm</p>
<p>http://renaud.waldura.com/doc/java/dijkstra/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=155&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/02/05/dijkstras-algorithm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>LinkedList &#8211; Nth element</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/02/05/linkedlist-nth-element/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/02/05/linkedlist-nth-element/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 17:50:06 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Data Structures]]></category>
		<category><![CDATA[LinkedList]]></category>
		<category><![CDATA[Nth element from the last element]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=150</guid>
		<description><![CDATA[QUES: Consider a singly linked list. What is the optimal way to traverse to an Nth element from the last element of that singly linked list. Any algorithms or logic to achieve in optimal way? Naive soln : First find the total number of nodes, by iterating the entire list .. Now subtract the nth [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=150&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>QUES: </strong><br />
Consider a singly linked list. What is the optimal way to traverse to an Nth element from the last element of that singly linked list. Any algorithms or logic to achieve in optimal way?</p>
<p><strong><span style="text-decoration:underline;"> </span></strong><strong><span style="text-decoration:underline;">Naive soln :</span></strong></p>
<ul>
<li>First find the total number of nodes,      by iterating the entire list ..</li>
<li>Now subtract the nth last node from the      total number</li>
<li>Now again iterate from the head node to      the nth node…</li>
</ul>
<p>But it require two complete iteration..</p>
<p><strong><span style="text-decoration:underline;">Optimized soln : </span></strong></p>
<ul>
<li>Create two pointers and point those      pointers to head node..</li>
<li>Iterate first pointer to nth node..</li>
<li>Now, iterate both first node pointer      and second node pointer, until first node pointer reaches the end of the      list .. Now second pointer will be pointing to the nth node from the last      node..<span id="more-150"></span></li>
</ul>
<p>List :<br />
We need to find 3<sup>rd</sup> from the last, that is <strong>40</strong></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="74" valign="top">80</td>
<td width="74" valign="top">70</td>
<td width="74" valign="top">60</td>
<td width="74" valign="top">50</td>
<td width="74" valign="top">40</td>
<td width="74" valign="top">30</td>
<td width="74" valign="top">20</td>
</tr>
</tbody>
</table>
<p>P1 – pointer 1  &amp; P2- pointer 2  both pointing to head node</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="74" valign="top"><strong>P1,P2</strong> -80</td>
<td width="74" valign="top">70</td>
<td width="74" valign="top">60</td>
<td width="74" valign="top">50</td>
<td width="74" valign="top">40</td>
<td width="74" valign="top">30</td>
<td width="74" valign="top">20</td>
</tr>
</tbody>
</table>
<p>P1 Iterate first pointer to nth node.. ie n=3</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="74" valign="top"><strong>P2 </strong>- 80</td>
<td width="74" valign="top">70</td>
<td width="74" valign="top"><strong>P1</strong> &#8211; 60</td>
<td width="74" valign="top">50</td>
<td width="74" valign="top">40</td>
<td width="74" valign="top">30</td>
<td width="74" valign="top">20</td>
</tr>
</tbody>
</table>
<p>Iterate both first node pointer and second node pointer, until first node pointer reaches the end of the list</p>
<p><strong> </strong></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="74" valign="top">80</td>
<td width="74" valign="top">70</td>
<td width="74" valign="top">60</td>
<td width="74" valign="top">50</td>
<td width="74" valign="top"><strong>P2</strong> &#8211; 40</td>
<td width="74" valign="top">30</td>
<td width="74" valign="top"><strong>P1 &#8211; </strong>20</td>
</tr>
</tbody>
</table>
<p><strong><span style="text-decoration:underline;">Program</span></strong><strong><span style="text-decoration:underline;"> </span></strong><strong><span style="text-decoration:underline;">: </span></strong></p>
<pre><span style="color:green;">/**
 *
 * @author vignesh_v
 */</span>

<span style="color:blue;">class</span> LinkedList {

    LinkedList nextNode;
    <span style="color:blue;">int</span> data;

    LinkedList(<span style="color:blue;">int</span> data) {
        <span style="color:blue;">this</span>.data = data;
    }

    <span style="color:blue;">void</span> display() {
        System.out.println(<span style="color:maroon;">"Value "</span> + data);
    }
}

<span style="color:blue;">class</span> LinkedListCreation {

    LinkedList firstNode;

    LinkedListCreation() {
        firstNode = <span style="color:blue;">null</span>;
    }
    <span style="color:green;">//Adding datas to LinkedList</span>

    <span style="color:blue;">void</span> insert(<span style="color:blue;">int</span> data) {
        LinkedList list = <span style="color:blue;">new</span> LinkedList(data);
        list.nextNode = firstNode;
        firstNode = list;
    }

    <span style="color:blue;">void</span> display() {
        LinkedList currentNode = firstNode;
        while (currentNode != <span style="color:blue;">null</span>) {
            currentNode.display();
            currentNode = currentNode.nextNode;
        }
    }

    LinkedList findNthLast(<span style="color:blue;">int</span> n) {
        <span style="color:green;">//Create two pointers and point those pointers to head node..</span>
        LinkedList pointerNode1 = firstNode;
        LinkedList pointerNode2 = firstNode;
        <span style="color:green;">//Iterate first pointer to nth node.. </span>
        <span style="color:blue;">for</span> (<span style="color:blue;">int</span> i = <span style="color:maroon;">1</span>; i &lt; n; i++) {
            <span style="color:blue;">if</span> (pointerNode1 == <span style="color:blue;">null</span>) {
                <span style="color:blue;">return</span> <span style="color:blue;">null</span>;
            } <span style="color:blue;">else</span> {
                pointerNode1 = pointerNode1.nextNode;

            }

        }
        <span style="color:green;">//Iterate both first node pointer and second node pointer, </span>
        <span style="color:green;">//until first node pointer reaches the end of the list .. </span>
        <span style="color:green;">//Now second pointer will be pointing to the nth node from </span>
        <span style="color:green;">//the last node..</span>
        while (pointerNode1.nextNode != <span style="color:blue;">null</span>) {
            pointerNode1 = pointerNode1.nextNode;
            pointerNode2 = pointerNode2.nextNode;
        }
        <span style="color:green;">//nthLastNode</span>
        <span style="color:blue;">return</span> pointerNode2;
    }
}

<span style="color:blue;">public</span> <span style="color:blue;">class</span> TestLinkedList {

    <span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> main(String[] a) {
        LinkedListCreation listCreation = <span style="color:blue;">new</span> LinkedListCreation();
        listCreation.insert(<span style="color:maroon;">20</span>);
        listCreation.insert(<span style="color:maroon;">30</span>);
        listCreation.insert(<span style="color:maroon;">40</span>);
        listCreation.insert(<span style="color:maroon;">50</span>);
        listCreation.insert(<span style="color:maroon;">60</span>);
        listCreation.insert(<span style="color:maroon;">70</span>);
        listCreation.insert(<span style="color:maroon;">80</span>);

        listCreation.display();
        LinkedList listFound = listCreation.findNthLast(<span style="color:maroon;">3</span>);
        <span style="color:blue;">if</span> (listFound != <span style="color:blue;">null</span>) {
            listFound.display();
        }
    }
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=150&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/02/05/linkedlist-nth-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Dynamic class &#8220;on the fly&#8221;</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/01/19/create-dynamic-class-on-the-fly/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/01/19/create-dynamic-class-on-the-fly/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 16:58:49 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[- target]]></category>
		<category><![CDATA[com.sun.tools.javac.Main]]></category>
		<category><![CDATA[dynamic class]]></category>
		<category><![CDATA[DynamicClassCreation]]></category>
		<category><![CDATA[getDeclaredMethod]]></category>
		<category><![CDATA[javac]]></category>
		<category><![CDATA[on the fly]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=141</guid>
		<description><![CDATA[How to create a dynamic class &#8220;on the fly&#8221; : com.sun.tools.javac.Main class has two methods which help us to invoke the compiler from a program. It will behave like javac command. public static int compile(String []args); public static int compile(String []args , PrintWriter out); args-&#62; command line arguments that would be normally be passed on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=141&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;">How to create a dynamic class &#8220;on the fly&#8221; :</span></p>
<p><a title="Source Code" href="http://www.docjar.com/html/api/com/sun/tools/javac/Main.java.html" target="_blank"><strong>com.sun.tools.javac.Main</strong></a> class has two methods which help us to invoke the compiler from a program. It will behave like javac command.<br />
public static int <strong>compile</strong>(String []args);<br />
public static int <strong>compile</strong>(String []args , PrintWriter out);</p>
<p><strong>args</strong>-&gt; command line arguments that would be normally be passed on the javac program.<br />
<strong>out</strong>-&gt; indicates where the compiler&#8217;s output is directed.<br />
<strong>return </strong>(int) -&gt; exit value</p>
<p>I would like to share a simple program which will create a java file on the fly (ie at Runtime) and it will be compiled using <strong>compile </strong>method provided by this class <strong><a title="Source Code" href="http://www.docjar.com/html/api/com/sun/tools/javac/main/Main.java.html" target="_blank">com.sun.tools.javac.Main</a>.</strong>Once its  been compiled,using reflection apis we will invoke the method in the class(which is created at Runtime)..<span id="more-141"></span><strong><strong> </strong></strong></p>
<p style="padding-left:30px;"><span style="color:blue;">import</span> java.io.FileWriter;<br />
<span style="color:blue;">import</span> java.lang.reflect.Method;<br />
<span style="color:blue;">public</span> <span style="color:blue;">class</span> DynamicClassCreation<br />
{<br />
<span style="color:green;">//ClassName </span><br />
<span style="color:blue;">static</span> <span style="color:blue;">final</span> String className=<span style="color:maroon;">&#8220;DynamicTestClass&#8221;</span>;<br />
<span style="color:blue;">static</span> <span style="color:blue;">final</span> String fileName=className+<span style="color:maroon;">&#8220;.java&#8221;</span>;</p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> main(String []a)<br />
{<br />
createClass();<br />
}<br />
<span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> createClass()<br />
{<br />
String methodName=<span style="color:maroon;">&#8220;execute&#8221;</span>;<br />
String parameterName=<span style="color:maroon;">&#8220;strParam&#8221;</span>;<br />
<span style="color:blue;">try</span>{<br />
<span style="color:green;">//Creates DynamicTestClass.java file</span><br />
FileWriter fileWriter=<span style="color:blue;">new</span> FileWriter(fileName,<span style="color:maroon;">false</span>);<br />
fileWriter.write(<span style="color:maroon;">&#8220;public class &#8220;</span>+ className +<span style="color:maroon;">&#8221; {\n&#8221;</span>);<br />
fileWriter.write(<span style="color:maroon;">&#8220;public String &#8220;</span>+methodName +<span style="color:maroon;">&#8220;(String &#8220;</span>+parameterName+<span style="color:maroon;">&#8220;) {\n&#8221;</span>);<br />
fileWriter.write(<span style="color:maroon;">&#8220;System.out.println(\&#8221; Testing\&#8221;);\n&#8221;</span>);<br />
fileWriter.write(<span style="color:maroon;">&#8220;return &#8220;</span>+parameterName +<span style="color:maroon;">&#8220;+ \&#8221; is dumb\&#8221;;\n }\n}&#8221;</span>);<br />
fileWriter.flush();<br />
fileWriter.close();</p>
<p style="padding-left:30px;">String[] source = { <span style="color:blue;">new</span> String(fileName) };<br />
<span style="color:green;">//javac -&gt; compile method in Main class ..presents in tools.jar</span><br />
<span style="color:green;">//Compile the DynamicTestClass.java ,created on the fly</span><br />
com.sun.tools.javac.Main.compile(source);</p>
<p style="padding-left:30px;"><span style="color:green;">// Creates an object of type Class which contains the information of</span><br />
<span style="color:green;">// the class String</span><br />
Class classObj=Class.forName(className);<br />
<span style="color:green;">// getDeclaredMethod() returns the declared methods of the class.</span><br />
Method method= classObj.getDeclaredMethod(methodName,<span style="color:blue;">new</span> Class[] { String.<span style="color:blue;">class</span>}); <span style="color:green;">//for int -&gt; Integer.TYPE;</span><br />
<span style="color:green;">//Invoking the execute method and passing the value for String parameter</span><br />
String returnVal =(String) method.invoke(classObj.newInstance(),<span style="color:blue;">new</span> Object[] { <span style="color:maroon;">&#8220;Vignesh&#8221;</span>});<br />
System.out.println(<span style="color:maroon;">&#8220;Value return from DynamicTestClass : &#8220;</span>+ returnVal);<br />
}<br />
<span style="color:blue;">catch</span>(Exception e)<br />
{<br />
e.printStackTrace();<br />
}<br />
}<br />
}</p>
<p>Before compiling this class, we should set the classpath for <strong>tools.jar</strong> file..</p>
<p><strong>C:\java&gt;</strong>set CLASSPATH=C:\Java\jdk1.5.0_16\lib\tools.jar;%CLASSPATH%</p>
<p>Compile : <strong>javac DynamicClassCreation.java</strong><br />
Run : <strong>java DynamicClassCreation</strong></p>
<p><strong><span style="text-decoration:underline;">Note:</span><br />
</strong>target option:</p>
<p>We have jdk 1.5, but we would like to compile the code that will run on a 1.4 VM.<strong>-target 1.4 </strong>option ensures that the generated class files will be compatible with 1.4 VMs.</p>
<p>EX:<br />
javac -target 1.4 -bootclasspath jdk1.4.2/lib/classes.zip \<br />
-extdirs &#8220;&#8221; TestClass.java</p>
<p><strong><span style="text-decoration:underline;">Reference:</span></strong><br />
<strong>Javac: </strong> http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html<br />
<strong></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=141&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/01/19/create-dynamic-class-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Disassemble</title>
		<link>http://vigneshbhupathi.wordpress.com/2010/01/12/116/</link>
		<comments>http://vigneshbhupathi.wordpress.com/2010/01/12/116/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 15:31:04 +0000</pubDate>
		<dc:creator>Vignesh</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ACC_SYNCHRONIZED]]></category>
		<category><![CDATA[aload_0]]></category>
		<category><![CDATA[ByteCode]]></category>
		<category><![CDATA[disassemble java]]></category>
		<category><![CDATA[invokespecial]]></category>
		<category><![CDATA[java synchronized]]></category>
		<category><![CDATA[java synchronized block]]></category>
		<category><![CDATA[javap]]></category>
		<category><![CDATA[javap command]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[opcode]]></category>
		<category><![CDATA[synchronized]]></category>

		<guid isPermaLink="false">http://vigneshbhupathi.wordpress.com/?p=116</guid>
		<description><![CDATA[disassemble java to bytecode<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=116&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration:underline;">Java -Dis<strong>@$$</strong>emble</span></p>
<p>This material -&gt; It would be helpful for <strong>java interview</strong> for sure (for Product company <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) .. Its bit lengthy, I will try to modify this material.. Even I hate to read big paragraph, first time I took some notes and created a simple doc..  I am glad to share this with you all..</p>
<p>Till now, I didn’t concern about the details of what happened to the source code when it’s run through the compiler. I would like to share my findings (behind the scene details).</p>
<p><strong>Javap </strong>utility is used to disassemble java bytecode (ie binary format into readable format) .This utility is included in Jdk .<span id="more-116"></span></p>
<p>Let’s start with a simple example and we try to analyze the bytecode.</p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> JavaBehindTheScene<br />
{<br />
<span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> main(String []a)<br />
{<br />
System.out.println(<span style="color:maroon;">&#8220;Vignesh bhupathi&#8221;</span>);<br />
}<br />
}</p>
<p>Once we compiled this above program, we need to execute this command “<strong>javap –c JavaBehindTheScene </strong>“ to view the bytecode.</p>
<p>‘-c ‘ option -&gt; to disassemble the code.To know more options for javap, just execute javap –help.</p>
<p style="padding-left:30px;">C:\java&gt; <strong>javap -c JavaBehindTheScene</strong><br />
Compiled from <span style="color:maroon;">&#8220;JavaBehindTheScene.java&#8221;</span><br />
<span style="color:blue;">public</span> <span style="color:blue;">class</span> JavaBehindTheScene <span style="color:blue;">extends</span> java.lang.Object{<br />
<span style="color:blue;">public</span> JavaBehindTheScene();<br />
Code:<br />
<span style="color:maroon;">0</span>:   aload_0<br />
<span style="color:maroon;">1</span>:   invokespecial   #<span style="color:maroon;">1</span>; <span style="color:green;">//Method java/lang/Object.&#8221;&amp;lt;init&amp;gt;&#8221;:()V</span><br />
<span style="color:maroon;">4</span>:   <span style="color:blue;">return</span></p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> main(java.lang.String[]);<br />
Code:<br />
<span style="color:maroon;">0</span>:   getstatic       #<span style="color:maroon;">2</span>; <span style="color:green;">//Field java/lang/System.out:Ljava/io/PrintStream;</span><br />
<span style="color:maroon;">3</span>:   ldc     #<span style="color:maroon;">3</span>; <span style="color:green;">//String Vignesh bhupathi</span><br />
<span style="color:maroon;">5</span>:   invokevirtual   #<span style="color:maroon;">4</span>; <span style="color:green;">//Method java/io/PrintStream.println:(Ljava/lang/Str</span><br />
ing;)V<br />
<span style="color:maroon;">8</span>:   <span style="color:blue;">return</span><br />
}</p>
<p>We can view two methods in the bytecode (output of javap).</p>
<p>First method <strong>public</strong> <strong>JavaBehindTheScene()</strong> ,it indicates the constructor of the class. Even though we didn’t declare the definition of constructor, by default it will create.</p>
<p><strong>0</strong>-&gt;offset instruction from the beginning of the method.<strong>aload_0</strong> -&gt;prefix ‘<strong>a</strong>’ refers object reference. Similarly <strong>iload_0 </strong>-&gt; ‘<strong>i</strong>’ refers integer,’<strong>c</strong>’- char, ’<strong>b</strong>’ –byte etc. This prefix helps us to find what type of data is being used.This opcode will push the value from index <strong>0 </strong>of the local variable table onto the operand stack&#8230; The “<strong>this</strong>” reference is always stored at location <strong>0</strong> of the local variable table for the constructor &amp; instance. It will be pushed because the method is accessing the instance data, name, of the class&#8230;</p>
<p>Index <strong>0</strong> -Usually it will store the parameters. For constructor or instance method, the reference will stored at <strong>0</strong>.For static method, parameter is stored in location <strong>0</strong>.</p>
<p>Before going into this, we will try to understand how JVM implementing this. JVM is stack based machine. Each Thread will have separate JVM stack which store <strong>frames</strong>. A frame will be created, when a method is invoked. Frame contains an operand stack, an array of local variables and reference to the runtime constant pools.</p>
<p><strong> </strong></p>
<p><strong>FRAME </strong><br />
<a href="http://vigneshbhupathi.files.wordpress.com/2010/01/frame.jpg"><img class="alignnone size-medium wp-image-120" title="frame" src="http://vigneshbhupathi.files.wordpress.com/2010/01/frame.jpg?w=300&#038;h=103" alt="" width="300" height="103" /></a></p>
<p>Now back to the point, take next opcode, <strong>invokespecial</strong> -&gt; calls the constructor of this class’s Superclass. During this opcode, the top value from the operand stack, “<strong>this</strong>”, is popped. <strong>#1 – </strong>It will helpful to<strong> </strong>build an index into runtime constant pool of the class where the reference to name is stored.</p>
<p>Finally opcode, <strong>return</strong> -&gt; it will return from the constructor.</p>
<p>Next, we will move to the <strong>main</strong> method.</p>
<p>Opcode <strong>getstatic</strong> , this will get the static field ( System.out) and it will push it on the operand stack. <strong>#2</strong> – it will put it in constant pool table at index 2.</p>
<p>Opcode <strong>ldc</strong>,    load the constant onto the operand stack. So it will load the string “Vignesh bhupathi” -&gt;from index <strong>#3</strong>.</p>
<p>Opcode <strong>invokevirtual</strong> , This will invoke the pritnln method in System.out ,it will pop the operands in the stack and then execute the method.</p>
<p>Finally, we are done with the method, so it will return back.We can find more details about instruction set over <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#7143">here </a>.</p>
<p>You may ask: what is the need to look for this bytecode? Sometime we may not sure whether the code which we try to implement is good (performance wise). So how do we analyze  the performance of the code as well as to find the size of the code ?</p>
<p>If we are not sure about this, then we can use this <strong>javap</strong> tool to know about the size of the opcode (by checking the bytecode) as well as we can identify the instructions (opcode) in the bytecode. This would help us to analyze the code which we have written. Let we take an example,</p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">class</span> JavaBehindTheScene<br />
{<br />
<span style="color:blue;">int</span> arr[]=<span style="color:blue;">new</span> <span style="color:blue;">int</span>[]{<span style="color:maroon;">1</span>,<span style="color:maroon;">2</span>,<span style="color:maroon;">3</span>};<br />
<span style="color:blue;">public</span> <span style="color:blue;">synchronized</span> <span style="color:blue;">int</span> getArr1()<br />
{<br />
<span style="color:blue;">return</span> arr[<span style="color:maroon;">0</span>];<br />
}<br />
<span style="color:blue;">public</span> <span style="color:blue;">int</span> getArr2()<br />
{<br />
<span style="color:blue;">synchronized</span>(<span style="color:blue;">this</span>)<br />
{<br />
<span style="color:blue;">return</span> arr[<span style="color:maroon;">2</span>];<br />
}<br />
}<br />
<span style="color:blue;">public</span> <span style="color:blue;">static</span> <span style="color:blue;">void</span> main(String []a)<br />
{<br />
System.out.println(<span style="color:maroon;">&#8220;Vignesh bhupathi&#8221;</span>);<br />
}<br />
}</p>
<p style="padding-left:30px;">
<p>Bytecode: <strong>javap –c JavaBehindTheScene</strong></p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">synchronized</span> <span style="color:blue;">int</span> getArr1();<br />
Code:<br />
<span style="color:maroon;">0</span>:   aload_0<br />
<span style="color:maroon;">1</span>:   getfield        #<span style="color:maroon;">2</span>; <span style="color:green;">//Field arr:[I</span><br />
<span style="color:maroon;">4</span>:   iconst_0<br />
<span style="color:maroon;">5</span>:   iaload<br />
<span style="color:maroon;">6</span>:   ireturn</p>
<p style="padding-left:30px;"><span style="color:blue;">public</span> <span style="color:blue;">int</span> getArr2();<br />
Code:<br />
<span style="color:maroon;">0</span>:   aload_0<br />
<span style="color:maroon;">1</span>:   dup<br />
<span style="color:maroon;">2</span>:   astore_1<br />
<span style="color:maroon;">3</span>:   monitorenter<br />
<span style="color:maroon;">4</span>:   aload_0<br />
<span style="color:maroon;">5</span>:   getfield        #<span style="color:maroon;">2</span>; <span style="color:green;">//Field arr:[I</span><br />
<span style="color:maroon;">8</span>:   iconst_2<br />
<span style="color:maroon;">9</span>:   iaload<br />
<span style="color:maroon;">10</span>:  aload_1<br />
<span style="color:maroon;">11</span>:  monitorexit<br />
<span style="color:maroon;">12</span>:  ireturn<br />
<span style="color:maroon;">13</span>:  astore_2<br />
<span style="color:maroon;">14</span>:  aload_1<br />
<span style="color:maroon;">15</span>:  monitorexit<br />
<span style="color:maroon;">16</span>:  aload_2<br />
<span style="color:maroon;">17</span>:  athrow<br />
Exception table:<br />
from   to  target type<br />
<span style="color:maroon;">4</span> <span style="color:maroon;">12</span> <span style="color:maroon;">13</span> any<br />
<span style="color:maroon;">13</span> <span style="color:maroon;">16</span> <span style="color:maroon;">13</span> any</p>
<p>This <strong>getArr1</strong>,<strong> getArr2</strong> functionality wise similar but the way they have used synchronized keyword is different. We can examine the bytecode for both the method. It’s obvious to say <strong>getArr1</strong> is good when comparing to <strong>getArr2</strong> method. <strong>getArr2</strong> method is larger as well as slower when compared to <strong>getArr1</strong>.</p>
<p><strong> </strong></p>
<p><strong>getArr1</strong> method didn’t generate any extra opcode for synchronized keyword where as <strong>getArr2</strong> uses synchronized in the body of the method (we can view that <strong>monitorenter</strong> , <strong>monitorexit </strong>opcode as well as additional code for handling exceptions<strong> ).</strong>For <strong>getArr2</strong> method, lock can be handled by using this <strong>monitorenter</strong> &amp; <strong>monitorexit </strong>opcode, where as for <strong>getArr1</strong> method it little bit different.</p>
<p>When JVM invokes this method <strong>getArr1</strong>, it checks for the ACC_SYNCHRONIZED property flag. If this flag present then the Thread executing this method will acquire the lock and release the lock, once it’s done with the work.</p>
<p><strong>Note: method_info</strong> structure will have this flag ACC_SYNCHRONIZED. We can find the detail <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#84874">here</a></p>
<p>I prefer to use the method modifier over the synchronized block in order to produce smaller bytecode as well as it run slightly faster code.</p>
<p><span style="text-decoration:underline;"><strong>References :</strong></span></p>
<p><a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#84874">http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#84874</a></p>
<p><a href="http://www.idevelopment.info/data/Programming/java/miscellaneous_java/Using_javap.html">http://www.idevelopment.info/data/Programming/java/miscellaneous_java/Using_javap.html</a></p>
<p><a href="http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#7143">http://java.sun.com/docs/books/jvms/second_edition/html/Overview.doc.html#7143</a></p>
<p><a href="http://www.javaranch.com/journal/200408/ScjpTipLine-javap.html">http://www.javaranch.com/journal/200408/ScjpTipLine-javap.html</a></p>
<p><a href="http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/">http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vigneshbhupathi.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vigneshbhupathi.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vigneshbhupathi.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vigneshbhupathi.wordpress.com&amp;blog=9184579&amp;post=116&amp;subd=vigneshbhupathi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vigneshbhupathi.wordpress.com/2010/01/12/116/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">adroitvignesh</media:title>
		</media:content>

		<media:content url="http://vigneshbhupathi.files.wordpress.com/2010/01/frame.jpg?w=300" medium="image">
			<media:title type="html">frame</media:title>
		</media:content>
	</item>
	</channel>
</rss>
