<?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>Vivek&#039;s Tech Blog</title>
	<atom:link href="http://techvivek.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://techvivek.wordpress.com</link>
	<description>Technical Blogs Mainly About Java  Technologies</description>
	<lastBuildDate>Tue, 17 Jan 2012 02:32:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='techvivek.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vivek&#039;s Tech Blog</title>
		<link>http://techvivek.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://techvivek.wordpress.com/osd.xml" title="Vivek&#039;s Tech Blog" />
	<atom:link rel='hub' href='http://techvivek.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Sending file from One Linux machine to another machine</title>
		<link>http://techvivek.wordpress.com/2012/01/08/sending-file-from-one-linux-machine-to-another-machine/</link>
		<comments>http://techvivek.wordpress.com/2012/01/08/sending-file-from-one-linux-machine-to-another-machine/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 05:41:45 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=247</guid>
		<description><![CDATA[I had some files which need to be sent a file from one Linux machine to another. Till that time my usual approach would be to download the file to my local desktop from first Linux machine then again upload &#8230; <a href="http://techvivek.wordpress.com/2012/01/08/sending-file-from-one-linux-machine-to-another-machine/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=247&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had some files which need to be sent a file from one Linux machine to another. Till that time my usual approach would be to download the file to my local desktop from first Linux machine then again upload it to second machine.<br />
But recently I came to know about &#8220;nc&#8221; command which  open a raw TCP/IP socket from one machine. We can use this command to send data from one machine to another directly</p>
<p>Step 1:- Set receiving computer in listening mode.<br />
<code><br />
nc –l 9999 &gt; abc.tar<br />
</code><br />
This command will open a client socket on the current machine(say Target Machine) on port 9999 and listen on it. Whenever some program sends data on this port, it will dump those data to abc.tar file.</p>
<p>Step 2:- Send file from the sender computer<br />
<code><br />
     tar -cvpz &lt;file or folder&gt;  | nc  9999<br />
</code><br />
This command will open a TCP/IP connection to , tar the file and send the raw stream to target machine on port 9999</p>
<p>This is much simpler and quicker way to transfer any file from one machine to another machine. There are many ways to use nc command some of them are listed <a href="http://en.wikipedia.org/wiki/Netcat">here</a>. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/247/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/247/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/247/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=247&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2012/01/08/sending-file-from-one-linux-machine-to-another-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>2011 in review</title>
		<link>http://techvivek.wordpress.com/2012/01/01/2011-in-review/</link>
		<comments>http://techvivek.wordpress.com/2012/01/01/2011-in-review/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 01:53:51 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=245</guid>
		<description><![CDATA[The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog. Here&#8217;s an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 7,100 times in 2011. If it were a NYC subway &#8230; <a href="http://techvivek.wordpress.com/2012/01/01/2011-in-review/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=245&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.</p>
<div style="background:url('/wp-content/mu-plugins/annual-reports/img/emailteaser.jpg') no-repeat center center;height:300px;"></div>
<p>Here&#8217;s an excerpt:</p>
<blockquote><p>A New York City subway train holds 1,200 people. This blog was viewed about <strong>7,100</strong> times in 2011. If it were a NYC subway train, it would take about 6 trips to carry that many people.</p></blockquote>
<p><a href="/2011/annual-report/">Click here to see the complete report.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=245&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2012/01/01/2011-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Good API Designing by Joshua Bloch</title>
		<link>http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/</link>
		<comments>http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 03:01:45 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=236</guid>
		<description><![CDATA[I came across the name Joshua Bloch when I was looking for a good java book which does not teach programming but tells how to effectively use Java. The more I read his books(Effective Java,Coders at Work), articles the more &#8230; <a href="http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=236&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I came across the name<a href="http://en.wikipedia.org/wiki/Joshua_Bloch"> Joshua Bloch</a> when I was looking for a good java book which does not teach programming but tells how to effectively use Java. The more I read his books(<a href="http://www.amazon.com/Effective-Java-Programming-Language-Guide/dp/0201310058">Effective Java</a>,<a href="http://www.amazon.com/Coders-Work-Reflections-Craft-Programming/dp/1430219483">Coders at Work</a>), articles the more I become aware that there are one thing to know the syntax and quite another thing to use effectively. Here I am posting one video where he describes the basics of designing an API</p>
<span style="text-align:center; display: block;"><a href="http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/"><img src="http://img.youtube.com/vi/aAb7hSCtvGw/2.jpg" alt="" /></a></span>
<span style="text-align:center; display: block;"><a href="http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/"><img src="http://img.youtube.com/vi/V1vQf4qyMXg/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/236/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=236&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2011/09/16/good-api-designing-by-joshua-bloch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Seven Years in Software Industry</title>
		<link>http://techvivek.wordpress.com/2011/07/23/seven-years-in-software-industry/</link>
		<comments>http://techvivek.wordpress.com/2011/07/23/seven-years-in-software-industry/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 14:06:20 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=228</guid>
		<description><![CDATA[I would not say that I was busy but really speaking feeling lazy from last couple of days and was living a very routinely life between office home office home that I don&#8217;t realize that I had completed seven years &#8230; <a href="http://techvivek.wordpress.com/2011/07/23/seven-years-in-software-industry/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=228&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would not say that I was busy but really speaking feeling lazy from last couple of days and was living a very routinely life between office home office home that I don&#8217;t realize that  I had completed seven years in software industry. It was the 7th July 2004 that I was waiting in the lobby of <a href="www.suntecgroup.com" target="_blank">first company</a> business solution to get formally inducted in the team. It seems that it is yesterday&#8217;s incident. But when I see the new people who come to join the company then I realize that it was the day 7 years back.<br />
Many things have changed, environment, city, company, technology named a few but what not changed is the thrill to explore and see new things.I still explore new things daily, get hooked to my PC to see the output of a program. I still feel a kind of restlessness or say dissatisfied with the code that I come across or write and try to explore the better way to do the things. You can always find 3-4 liner programs on my PC. I write these to clear my basic understanding.<br />
There are many new things that I have started which really spice up my life like exploring <a href="http://rubyonrails.org/" target="_blank">ruby on rails</a>, <a href="http://www.scala-lang.org/" target="_blank">scala</a>, Some no SQL DBs like <a href="http://cassandra.apache.org/" target="_blank">Cassandra</a>, caching tools like <a href="http://memcached.org/" target="_blank">memcached</a>,<a href="http://ehcache.org/" target="_blank"> ehcache </a>etc.</p>
<p>Lets see where this exploration end up.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=228&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2011/07/23/seven-years-in-software-industry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Heroku&#8230;</title>
		<link>http://techvivek.wordpress.com/2011/01/10/heroku/</link>
		<comments>http://techvivek.wordpress.com/2011/01/10/heroku/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 02:01:10 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=222</guid>
		<description><![CDATA[Here I deployed my first application on Ruby cloud Heroku.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=222&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here I deployed my <a href="http://techvivek.heroku.com/">first application</a> on Ruby cloud Heroku. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=222&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2011/01/10/heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Online Operating System?</title>
		<link>http://techvivek.wordpress.com/2010/09/25/online-operating-system/</link>
		<comments>http://techvivek.wordpress.com/2010/09/25/online-operating-system/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 15:36:09 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=220</guid>
		<description><![CDATA[As I was trying to download some code from github , I realized that I have to download and install Git first then use this software to download the code. Is it not some waste of time? Lets consider another &#8230; <a href="http://techvivek.wordpress.com/2010/09/25/online-operating-system/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=220&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I was trying to download some code from <a href="http://github.com/cbeust/jcommander">github </a>, I realized that I have to download and install Git first then use this software to download the code. Is it not some waste of time? Lets consider another example, suppose if you want to play a music file, then you have to  install the player first,then use it. Would it not be a better option if we move all the programs that we use (lets say all programs from (Window-&gt;Start -&gt; Programs) to a online virtual operating system. It would be a better idea if we move the complete operating system to online. We can access all our file,programs from anywhere in the world, and there will not be any need to install the program again.</p>
<p>There are some online desktop projects by <a href="http://magazine.redhat.com/2007/11/13/tour-of-gnome-online-desktop/">gnome </a>or  <a href="http://www.google.com/ig">igoogle </a>, but these are in initial stage. I am talking about an  online solution which moves the whole OS(say complete windows or Linux to online). We can install program on this online desktop,play games music like we do on normal system. I have not found any. Lets see when we will see these kind of softwares.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/220/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=220&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2010/09/25/online-operating-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>Never check in code in EOD!</title>
		<link>http://techvivek.wordpress.com/2010/09/14/never-check-in-code-in-eod/</link>
		<comments>http://techvivek.wordpress.com/2010/09/14/never-check-in-code-in-eod/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 13:58:02 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=217</guid>
		<description><![CDATA[We learn many things as we become more experienced. There are some lesson which are not been written in any book, we learn from our own experience. Each one of the developer has his/her own methods,tools and practices which he/she &#8230; <a href="http://techvivek.wordpress.com/2010/09/14/never-check-in-code-in-eod/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=217&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We learn many things as we become more experienced. There are some lesson which are not been written in any book, we learn from our own experience. Each one of the developer has his/her own methods,tools and practices which he/she develops and used as he progresses in life, and no two developer has same set of these. You can assume that each of the developer has an environment created by him/her in by learing/unlearning from his/her past experience. Here I am going to tell one simple practice that helps a lot. It says that: “Never Check In the code by End of Day(EoD)”.<br />
This is very siple yet powerful process which could stop a lot of bugs.Normally, What happens is that we delay all code check in task till, we are ready to return from office. So, at last we realize that we have to check in and we do it hurrily witout giving proper attention. This results in defect. Code check in is an important process and it should be done carefully. Whatever hard work we had done, if we miss to this process carefully its worth nothing. So, never check in the code by EOD until its necessary and urget, always try to check in before first half of the day. Another advantage of checkin in the code in first half is that if any there is any error(say compiled) we get enough time to fix those and check in the code.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=217&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2010/09/14/never-check-in-code-in-eod/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>equals and hashCode contract!</title>
		<link>http://techvivek.wordpress.com/2010/09/13/equals-and-hashcode-contract/</link>
		<comments>http://techvivek.wordpress.com/2010/09/13/equals-and-hashcode-contract/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 02:32:11 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=211</guid>
		<description><![CDATA[The general contract of hashCode is: •Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons &#8230; <a href="http://techvivek.wordpress.com/2010/09/13/equals-and-hashcode-contract/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=211&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The general <a href="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Object.html">contract</a> of hashCode is:</p>
<p>•Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.</p>
<p>•If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.</p>
<p>•It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.</p>
<p>I always has a doubt about contract 2. So, I try o clarify this doubt with an example. Consider a case when two objects are equals but returns difference hashCode.  Here is one class with bas hashCode and equals methos. I am specifying this class only for example.<br />
<code><br />
class myclass{<br />
 int value;<br />
 public myclass(int value){<br />
    this.value = value;<br />
}<br />
 public String toString(){<br />
    return "" + value;<br />
}<br />
 public boolean equals(Object obj){<br />
   return true;<br />
}<br />
 public int hashCode(){<br />
   return value;<br />
}<br />
</code><br />
Here we always returns true from equals methos, which says that all the objects are equals. But returns different values of hashCode.<br />
Now create a HashSet and store theese value:-<br />
<code><br />
import java.util.*;<br />
public class test{<br />
  public static void main(String args[]){<br />
   HashSet set = new HashSet();<br />
   myclass myObject1 = new myclass(12);<br />
   myclass myObject2 = new myclass(13);<br />
   set.add(myObject1);<br />
   set.add(myObject2);<br />
   System.out.println("HashSet is:"+set);<br />
   HashSet set2 = new HashSet();<br />
   set2.add("vivek");<br />
   set2.add("vivek");<br />
   System.out.println("HashSet2 is:"+set2);<br />
  }<br />
}<br />
</code><br />
Here is the output:-<br />
<code><br />
C:\DOCUME~1\Vivek&gt;java test<br />
HashSet is:[12, 13]<br />
HashSet2 is:[vivek]<br />
</code><br />
If you see the output you realize that eventough myObject1 and myObject2 are equals they are stored as different in HashSet, which is not the case with “vivek”.<br />
The reason behind this is that, the concept of equality is different in “hash based” collection. Given an object the system store these values in two levels one at bucket and another the values in side the bucket.</p>
<p>When we insert myObject1, system will calculate the hash value by calling hashCode method and this value determine the exact bucket under which this “myObject1” will fall. Just assume that this is mapped to bucket1.</p>
<p>Bucket1 &#8212;&gt;  myObject1</p>
<p>When we add another value system will first verify if the value is already present. In normal case this will happens by just calling equals method, nut in clase of “hash   based colelction” this happens in two steps. First hashCode of myObject2 is determined and this will decide the bucket, next system will search this bucket and calls equals method to check if any duplicate value is present. In this case myObject2 will be mapped to different bucket(in indeal situation this should be mapped to bucket1) and hence system will fail to verify that already an equal object(myObject1) is inserted.</p>
<p>Bucket2 &#8211;&gt; myObject2</p>
<p>And hence two duplicate values will be inserted in a set which is wrong.<br />
The concept of equality is different in case of “hash based collection”, two objects are considered equal only of they are equal(pass equals()) and have same hashCode.</p>
<p>The same concept applies with HashTable also. Lets modify the program little bit:-<br />
<code><br />
import java.util.*;<br />
public class test{<br />
  public static void main(String args[]){<br />
   Hashtable table1 = new Hashtable();<br />
   myclass myObject1 = new myclass(12);<br />
   myclass myObject2 = new myclass(13);<br />
   table1.put(myObject1,"abcde");<br />
   table1.put(myObject2,"bcdeff");<br />
   System.out.println("Hashtable 1 is:"+table1);</p>
<p>   Hashtable table2 = new Hashtable();<br />
   table2.put("vivek","abcde");<br />
   table2.put("vivek","bcdeff");<br />
   System.out.println("Hashtable 2 is:"+table2);<br />
  }<br />
}<br />
</code><br />
Here is the output:-<br />
<code><br />
C:\DOCUME~1\Vivek&gt;java test<br />
Hashtable 1 is:{13=bcdeff, 12=abcde}<br />
Hashtable 2 is:{vivek=bcdeff}<br />
</code><br />
Same reason as describe above applies here. myObject1 and myObject2 are treated differently eventhough they are equals, which is not the case with String (“vivek”)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=211&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2010/09/13/equals-and-hashcode-contract/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
		<item>
		<title>JBossWS example.</title>
		<link>http://techvivek.wordpress.com/2010/08/22/jbossws-example/</link>
		<comments>http://techvivek.wordpress.com/2010/08/22/jbossws-example/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 10:59:29 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=199</guid>
		<description><![CDATA[Jboss WS(http://jboss.org/jbossws) is a web service framework provided on Jboss Application Server to develop JAX WS compliant WebService. Developing a webservice is a very simple procee. Here I will try to develop a webservice and show how can we access &#8230; <a href="http://techvivek.wordpress.com/2010/08/22/jbossws-example/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=199&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Jboss WS(http://jboss.org/jbossws) is a web service framework provided on Jboss Application Server to develop JAX WS compliant WebService. Developing a webservice is a very simple procee. Here I will try to develop a webservice and show how can we access this web service.</p>
<p>We can develop a webservice eith by using Servlet Container Model or by EJB container model. Here I use servlet cotainer model to develop a web service.</p>
<p>Here is our simple business method:-<br />
<code><br />
package com.vivek.hello;<br />
public class Hello{<br />
public String sayHello(String userName){<br />
return "Hello  "+ userName;<br />
}<br />
}<br />
}<br />
</code> Exposing this business method is bery simple. We just need to add some annotations and package it as a war file.</p>
<p>Annotations:-<br />
<strong>1.javax.jws.WebService :</strong>- This annotation is placed at class level and this tells that the class is a web service.<br />
<strong>2.javax.jws.WebMethod :</strong>- This annotation is placed at method level and this tells that this method is exposed as Wbservice.</p>
<p>After applying these 2 annotation our class looks like:-<br />
<code><br />
package com.vivek.hello;<br />
import javax.jws.WebMethod;<br />
import javax.jws.WebService;<br />
@WebService<br />
public class Hello{<br />
@WebMethod<br />
public String sayHello(String userName){<br />
return "Hello  "+ userName;<br />
}<br />
}<br />
}<br />
</code> Now we have to write deployment descriptor for this webservice. This is same like writing deployment descriptor for a servlet.</p>
<p>Web.xml content:-<br />
<code></p>
<div id="_mcePaste">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</div>
<div id="_mcePaste">&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</div>
<div id="_mcePaste">xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"</div>
<div id="_mcePaste">xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"</div>
<div id="_mcePaste">id="WebApp_ID" version="2.5"&gt;</div>
<div id="_mcePaste">&lt;display-name&gt;JbossWS&lt;/display-name&gt;</div>
<div id="_mcePaste">&lt;servlet&gt;</div>
<div id="_mcePaste">&lt;servlet-name&gt;HelloWebService&lt;/servlet-name&gt;</div>
<div id="_mcePaste">&lt;servlet-class&gt;com.vivek.hello.Hello&lt;/servlet-class&gt;</div>
<div id="_mcePaste">&lt;/servlet&gt;</div>
<div id="_mcePaste">&lt;servlet-mapping&gt;</div>
<div id="_mcePaste">&lt;servlet-name&gt;HelloWebService&lt;/servlet-name&gt;</div>
<div id="_mcePaste">&lt;url-pattern&gt;/Hello/*&lt;/url-pattern&gt;</div>
<div id="_mcePaste">&lt;/servlet-mapping&gt;</div>
<div id="_mcePaste">&lt;/web-app&gt;</div>
<p></code><br />
Packaging:-</p>
<p>Create a war file with the above class and web.xml.</p>
<p>That&#8217;s it. Here we have developed a simple web service. Place this war file in<br />
folder and start the Jobss server.</p>
<p>To check this WebService open a browser and put http://localhost:8080//Hello/?wsdl. Ie( http://localhost:8080/JbossWs/Hello/?wsdl) If you get wsdl description then this web service is deployed successfully.</p>
<p>Here is the output of the browser:-<br />
<a href="http://techvivek.files.wordpress.com/2010/08/wsdl.png"><img class="aligncenter size-medium wp-image-200" title="wsdl" src="http://techvivek.files.wordpress.com/2010/08/wsdl.png?w=300&#038;h=217" alt="" width="300" height="217" /></a></p>
<p>Accessing webservice:-<br />
There are three methods to access a webservice:-<br />
<strong> 1.Stub.<br />
2.Dynamic Proxy<br />
3.Dymaic Invocation Interface(DII):-</strong></p>
<p>Stub is very simple, here we use the wsdl to generate different stub and skelton classes usind WSDL to Java conversion tool(http://ws.apache.org/axis/java/user-guide.html#UsingWSDLWithAxis ) and use these classes to access the web service like any standalone java program.</p>
<p>DII and Dynamic Proxy are more flexiable. Here we generate the stub skelton in runtime. These two differ int the way we access the webservice.  Let me demonstrate this by an example:-</p>
<p><strong>Dynamic Invocation Interface:-</strong><br />
<code><br />
import java.net.URL;<br />
import javax.xml.namespace.QName;<br />
import javax.xml.rpc.Call;<br />
import javax.xml.rpc.Service;<br />
import javax.xml.rpc.ServiceFactory;<br />
public class Test {<br />
public static void main(String[] argv)throws Exception<br />
{<br />
try<br />
{<br />
ServiceFactory factory	= ServiceFactory.newInstance();<br />
//Lookup Service. . Service is entry point for a web service.<br />
Service service = factory.createService(new URL(<br />
"http://localhost:8080/JbossWS/?wsdl"), new QName(<br />
"http://hello.vivek.com/", "HelloService"));<br />
//A webservice can have di,fferent port. Port is like a library of methods.<br />
//Set the location of wsdl.<br />
Call call = service.createCall(new QName("http://hello.vivek.com/","HelloPort"	),new QName("http://hello.vivek.com/","sayHello"));<br />
//Register input parameter and return type.</p>
<p>Object[] params = {"Vivek"};<br />
//Invoke the method.<br />
String result = (String)call.invoke(params);<br />
//Print the result.<br />
System.out.println(result);<br />
}<br />
catch (Exception e)<br />
{<br />
e.printStackTrace();<br />
}<br />
}<br />
}<br />
</code><br />
Output:-</p>
<p>Here we execute the method using method name. This is like reflection API. Once we know the details we can call the methods in runtime.  This is more flexible than Stub as we dont need to complie the calsses if out webservice interface changes.<br />
<code><br />
Hello  Vivek<br />
</code><br />
Note:- Here I used AXIS to call web service.</p>
<p>Dynamic Proxy:-</p>
<p>Dynamic proxy is less flexiable than DII and more flexiable than Dtub. Here we dynamically look up webservice interface.</p>
<p>Letus first create a new webservice with interface:-</p>
<p>Business Interface:-<br />
<code><br />
package com.vivek.hello.common;</p>
<p>import java.rmi.Remote;<br />
import java.rmi.RemoteException;</p>
<p>import javax.jws.WebService;</p>
<p>@WebService<br />
public interface IHello extends Remote{<br />
public String sayHello(String userName) throws RemoteException;<br />
}<br />
</code><br />
Webservice Inplementation:-<br />
<code><br />
package com.vivek.hello;</p>
<p>import javax.jws.WebMethod;<br />
import javax.jws.WebService;<br />
import com.vivek.hello.common.IHello;</p>
<p>@WebService(endpointInterface="com.vivek.hello.common.IHello")<br />
public class Hello implements IHello<br />
{<br />
@Override<br />
@WebMethod<br />
public String sayHello(String userName)<br />
{<br />
return "Greeting " + userName + "! Have a nice day...";<br />
}<br />
}<br />
</code><br />
Here we implement a webservice interface. EndpointInterface tells that which webservice interface we are implementing. Client will use this interface to acesss the webservice mthods.</p>
<p>Client Code using  Dynamic Proxy:<br />
<code><br />
import java.net.URL;</p>
<p>import javax.xml.namespace.QName;<br />
import javax.xml.rpc.Service;<br />
import javax.xml.rpc.ServiceFactory;</p>
<p>import com.vivek.hello.common.IHello;<br />
public class Test {<br />
public static void main(String[] argv)throws Exception<br />
{<br />
try<br />
{<br />
ServiceFactory factory	= ServiceFactory.newInstance();<br />
//Lookup Service. . Service is entry point for a web service.<br />
Service service = factory.createService(new URL(<br />
"http://localhost:8080/JbossWS/?wsdl"), new QName(<br />
"http://hello.vivek.com/", "HelloService"));<br />
//A webservice can have di,fferent port. Port is like a library of methods.<br />
//Set the location of wsdl.<br />
IHello helloInterface = (IHello)service.getPort(new QName("http://hello.vivek.com/","HelloPort"),IHello.class);<br />
//Invoke and Print the result.<br />
System.out.println(helloInterface.sayHello("Vivek"));<br />
}<br />
catch (Exception e)<br />
{<br />
e.printStackTrace();<br />
}<br />
}<br />
}<br />
</code><br />
Output:-<br />
<code><br />
Greeting Vivek! Have a nice day...<br />
</code><br />
Static Stub:-<br />
This is the simplest one. Here we get the wsdl file use a tool to compile(like WSDL2Java) the wsdl file which generats the client classes. We use these classes to call webservice client.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=199&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2010/08/22/jbossws-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>

		<media:content url="http://techvivek.files.wordpress.com/2010/08/wsdl.png?w=300" medium="image">
			<media:title type="html">wsdl</media:title>
		</media:content>
	</item>
		<item>
		<title>JDBC New Features..</title>
		<link>http://techvivek.wordpress.com/2010/08/13/jdbc-new-features/</link>
		<comments>http://techvivek.wordpress.com/2010/08/13/jdbc-new-features/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 02:01:55 +0000</pubDate>
		<dc:creator>Vivek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://techvivek.wordpress.com/?p=197</guid>
		<description><![CDATA[When we hear about JDBC, first thing that come to our mind is that it is a relatively older technology and there is nothing new to learn it. We become so habituated in using the JDBC like we do today(Connection,Statement, &#8230; <a href="http://techvivek.wordpress.com/2010/08/13/jdbc-new-features/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=197&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When we hear about JDBC, first thing that come to our mind is that it is a relatively older technology and there is nothing new to learn it. We become so habituated in using the JDBC like we do today(Connection,Statement, while loop etc) that we dont know that there are newer version available which provide another ways to do these things&#8230; Her is an interesting article about <a href="http://www.ibm.com/developerworks/java/library/j-5things10.html?ca=drs-">new features of JDBC</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techvivek.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techvivek.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techvivek.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techvivek.wordpress.com&amp;blog=8624812&amp;post=197&amp;subd=techvivek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://techvivek.wordpress.com/2010/08/13/jdbc-new-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/519eebd5dd75468c2af12b824c83de45?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Vivek</media:title>
		</media:content>
	</item>
	</channel>
</rss>
