<?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/"
	>

<channel>
	<title>TechPitcher &#187; Java</title>
	<atom:link href="http://www.techpitcher.com/category/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techpitcher.com</link>
	<description></description>
	<lastBuildDate>Sat, 29 May 2010 13:50:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Changing project type form general to java in eclipse</title>
		<link>http://www.techpitcher.com/changing-project-type-form-general-to-java-in-eclipse.html</link>
		<comments>http://www.techpitcher.com/changing-project-type-form-general-to-java-in-eclipse.html#comments</comments>
		<pubDate>Sun, 16 May 2010 07:26:16 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[eclipse]]></category>

		<guid isPermaLink="false">http://www.techpitcher.com/?p=214</guid>
		<description><![CDATA[You have a project, which is basically a java project but during checking out the project or creating a new project, you didn&#8217;t selected type of project as java. You are stuck now as there is no option to change it to java type in eclipse UI.
You can change type of project by modifying.projectfile, located [...]]]></description>
			<content:encoded><![CDATA[<p>You have a project, which is basically a java project but during checking out the project or creating a new project, you didn&#8217;t selected type of project as java. You are stuck now as there is no option to change it to java type in eclipse UI.<br />
You can change type of project by modifying<code>.project</code>file, located in the root directory of your project. Open .project file in any text editor and search for text &#8220;natures&#8221;. You&#8217;ll see an empty <code>natures</code> node.</p>
<pre class="brush: xml;">
&lt;natures&gt;
&lt;/natures&gt;
</pre>
<p>Change this value to </p>
<pre class="brush: xml;">
&lt;natures&gt;
        &lt;nature&gt;org.eclipse.jdt.core.javanature&lt;/nature&gt;
&lt;/natures&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/changing-project-type-form-general-to-java-in-eclipse.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.util.regex.PatternSyntaxException: Unclosed character class</title>
		<link>http://www.techpitcher.com/javautilregexpatternsyntaxexception-unclosed-character-class.html</link>
		<comments>http://www.techpitcher.com/javautilregexpatternsyntaxexception-unclosed-character-class.html#comments</comments>
		<pubDate>Sun, 24 Jan 2010 07:42:04 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[delimiter]]></category>
		<category><![CDATA[PatternSyntaxException]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=175</guid>
		<description><![CDATA[
Exception in thread &#34;main&#34; java.util.regex.PatternSyntaxException:
Unclosed character class near index 1 $[ ^ at java.util.regex.Pattern.error (Pattern.java:1503) at
java.util.regex.Pattern.clazz(Pattern.java:2016) at java.util.regex.Pattern.sequence(Pattern.java:1560)
at java.util.regex.Pattern.expr(Pattern.java:1520) at java.util.regex.Pattern.compile (Pattern.java:1288)
at java.util.regex.Pattern.&#38;lt;init&#38;gt;(Pattern.java:1044)  encountered while splitting the string
using a delimiter which contains &#34;[&#34;

]]></description>
			<content:encoded><![CDATA[<pre class="brush: java;">
Exception in thread &quot;main&quot; java.util.regex.PatternSyntaxException:
Unclosed character class near index 1 $[ ^ at java.util.regex.Pattern.error (Pattern.java:1503) at
java.util.regex.Pattern.clazz(Pattern.java:2016) at java.util.regex.Pattern.sequence(Pattern.java:1560)
at java.util.regex.Pattern.expr(Pattern.java:1520) at java.util.regex.Pattern.compile (Pattern.java:1288)
at java.util.regex.Pattern.&amp;lt;init&amp;gt;(Pattern.java:1044)  encountered while splitting the string
using a delimiter which contains &quot;[&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/javautilregexpatternsyntaxexception-unclosed-character-class.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JSON communication between server and client Part1</title>
		<link>http://www.techpitcher.com/json-communication-between-server-and-client-part1.html</link>
		<comments>http://www.techpitcher.com/json-communication-between-server-and-client-part1.html#comments</comments>
		<pubDate>Wed, 26 Aug 2009 15:35:33 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=170</guid>
		<description><![CDATA[JSON (JavaScript Object Notation) provides lightweight data exchange between server and client. It is human readable.
Sending data in JSON format from server to client:
There are APIs present for many languages (Java, ASP, Flex, C, C++ etc). With the help of these APIs, we can get JSON representation for data or objects. This data can be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.json.org/" target="_blank">JSON</a> (JavaScript Object Notation) provides lightweight data exchange between server and client. It is human readable.<br />
Sending data in JSON format from server to client:<br />
There are APIs present for many languages (Java, ASP, Flex, C, C++ etc). With the help of these APIs, we can get JSON representation for data or objects. This data can be send to client just like some other data.<br />
On the client side browser can handle this format and one can retrieve the information send from server.<br />
I am writing code sample for spring framework</p>
<pre class="brush: java;">
public void getJSONInfo(HttpServletRequest request, HttpServletResponse response) throws Exception {
    JSONObject result = new JSONObject();
    try {
        Object obj = new Object();
        // To get JSON data from obj
       JSONObject jsonObj = JSONObject.fromObject(obj);
       result.put(&quot;result&quot;, &quot;success&quot;);
       result.put(&quot;jsonInfo&quot;, jsonObj);
   } catch (Exception e) {
       result.put(&quot;result&quot;, &quot;error&quot;);
  } finally {
      // Write this jsonObj in HttpServletResponse
      response.getWriter().print(result);
      response.flushBuffer();
   }
}
</pre>
<p>While on the client side, I am using <a href="http://jquery.com/" target="_blank">jquery</a> to make AJAX request,</p>
<pre class="brush: jscript;">
function getJSONInfo() {
    $.ajax({
       url: '../location?q=getJSONInfo',
       type: &quot;POST&quot;,
       cache: false,
       dataType: &quot;json&quot;,
       success: function(response){
           alert(response.jsonInfo);
       },
       error: function(msg){
       }
    });
}
</pre>
<p>As we can see from the example, an ajax request is made to get JSONInfo and result is displayed in popup window.</p>
<p>Sending data in JSON format from client to server will be covered in part2</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/json-communication-between-server-and-client-part1.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS</title>
		<link>http://www.techpitcher.com/javaxmailmessagingexception-530-570-must-issue-a-starttls.html</link>
		<comments>http://www.techpitcher.com/javaxmailmessagingexception-530-570-must-issue-a-starttls.html#comments</comments>
		<pubDate>Wed, 20 May 2009 15:15:32 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Exception]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javax mail]]></category>
		<category><![CDATA[mail smtp]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=160</guid>
		<description><![CDATA[I am getting exception while sending mail using JavaMail APIs. Mail properties are as 

	mail.transport.protocol = smtp
	mail.smtp.host = mailHost
	mail.smtp.port = 25
	mail.smtp.auth = true

The exception I am getting while sending email

Exception in thread &#34;main&#34; javax.mail.SendFailedException: Sending failed;
        nested exception is:
	javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first m1sm949464nzf
 [...]]]></description>
			<content:encoded><![CDATA[<p>I am getting exception while sending mail using JavaMail APIs. Mail properties are as </p>
<pre class="brush: xml;">
	mail.transport.protocol = smtp
	mail.smtp.host = mailHost
	mail.smtp.port = 25
	mail.smtp.auth = true
</pre>
<p>The exception I am getting while sending email</p>
<pre class="brush: java;">
Exception in thread &quot;main&quot; javax.mail.SendFailedException: Sending failed;
        nested exception is:
	javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first m1sm949464nzf
 	at javax.mail.Transport.send0(Transport.java:219)
	at javax.mail.Transport.send(Transport.java:81)
	at example.SendMailUsingAuthentication.postMail(SendMailUsingAuthentication.java:77)
	at example.SendMailUsingAuthentication.main(SendMailUsingAuthentication.java:35)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/javaxmailmessagingexception-530-570-must-issue-a-starttls.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing tomcat in ubuntu/linux</title>
		<link>http://www.techpitcher.com/installing-tomcat-in-ubuntulinux.html</link>
		<comments>http://www.techpitcher.com/installing-tomcat-in-ubuntulinux.html#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:33:43 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=118</guid>
		<description><![CDATA[Download tomcat from http://tomcat.apache.org
Go to the directory where you have downloaded apache-tomcat-6.0.18.tar.gz

$ cd
$ tar xvzf apache-tomcat-6.0.14.tar.gz

Move tomcat to ~/opt directory

sudo mv apache-tomcat-6.0.18 ~/opt/tomcat

Now you can start tomcat by executing startup.sh script located in tomcat/bin directory.
&#60;&#60; Back to Setting up j2ee developer environment &#8230; 
]]></description>
			<content:encoded><![CDATA[<p>Download tomcat from http://tomcat.apache.org<br />
Go to the directory where you have downloaded apache-tomcat-6.0.18.tar.gz</p>
<pre class="brush: xml;">
$ cd
$ tar xvzf apache-tomcat-6.0.14.tar.gz
</pre>
<p>Move tomcat to ~/opt directory</p>
<pre class="brush: xml;">
sudo mv apache-tomcat-6.0.18 ~/opt/tomcat
</pre>
<p>Now you can start tomcat by executing startup.sh script located in tomcat/bin directory.</p>
<p><a href="http://techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html">&lt;&lt; Back to Setting up j2ee developer environment &#8230; </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/installing-tomcat-in-ubuntulinux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing eclipse in ubuntu/linux</title>
		<link>http://www.techpitcher.com/installing-eclipse-in-ubuntulinux.html</link>
		<comments>http://www.techpitcher.com/installing-eclipse-in-ubuntulinux.html#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:49:49 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=115</guid>
		<description><![CDATA[Download eclipse from http://www.eclipse.org/downloads/
Make an opt directory in user&#8217;s home directory

$ mkdir ~/opt

Go to the directory where you have downloaded eclipse

$ tar -xvf eclipse-SDK-3.4.1-linux-gtk.tar.gz &#38;&#38; mv eclipse ~/opt

Make a bin folder in user&#8217;s home directory

$ mkdir ~/bin

Next create an executable for Eclipe at ~/bin/eclipse

$ vi ~/bin/eclipse

Add the following lines in this file

export MOZILLA_FIVE_HOME=&#34;/usr/lib/mozilla/&#34;
export ECLIPSE_HOME=&#34;$HOME/opt/eclipse&#34;
$ECLIPSE_HOME/eclipse $*

Finally [...]]]></description>
			<content:encoded><![CDATA[<p>Download eclipse from http://www.eclipse.org/downloads/<br />
Make an opt directory in user&#8217;s home directory</p>
<pre class="brush: xml;">
$ mkdir ~/opt
</pre>
<p>Go to the directory where you have downloaded eclipse</p>
<pre class="brush: xml;">
$ tar -xvf eclipse-SDK-3.4.1-linux-gtk.tar.gz &amp;&amp; mv eclipse ~/opt
</pre>
<p>Make a bin folder in user&#8217;s home directory</p>
<pre class="brush: xml;">
$ mkdir ~/bin
</pre>
<p>Next create an executable for Eclipe at ~/bin/eclipse</p>
<pre class="brush: xml;">
$ vi ~/bin/eclipse
</pre>
<p>Add the following lines in this file</p>
<pre class="brush: xml;">
export MOZILLA_FIVE_HOME=&quot;/usr/lib/mozilla/&quot;
export ECLIPSE_HOME=&quot;$HOME/opt/eclipse&quot;
$ECLIPSE_HOME/eclipse $*
</pre>
<p>Finally make script executable</p>
<pre class="brush: xml;">
$ chmod +x ~/bin/eclipse
</pre>
<p>You can now execute that file to start up Eclipse.</p>
<p><a href='http://techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html'><< Back to Setting up j2ee developer environment ... </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/installing-eclipse-in-ubuntulinux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing JDK in ubuntu/linux</title>
		<link>http://www.techpitcher.com/installing-jdk-in-ubuntulinux.html</link>
		<comments>http://www.techpitcher.com/installing-jdk-in-ubuntulinux.html#comments</comments>
		<pubDate>Wed, 04 Feb 2009 18:23:13 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=112</guid>
		<description><![CDATA[To install jdk6.0 type the following command in terminal window

$ sudo apt-get install sun-java6-jdk

Provide password for root. It will show you agreement. Select  and wait for installation to be completed.
We should set JAVA_HOME environment variable after successful installation of jdk.

$ vi ~/.bashrc

Insert following line in above file

export JAVA_HOME=/usr/lib/jvm/java-6-sun

 ]]></description>
			<content:encoded><![CDATA[<p>To install jdk6.0 type the following command in terminal window</p>
<pre class="brush: xml;">
$ sudo apt-get install sun-java6-jdk
</pre>
<p>Provide password for root. It will show you agreement. Select  and wait for installation to be completed.<br />
We should set <code>JAVA_HOME</code> environment variable after successful installation of jdk.</p>
<pre class="brush: xml;">
$ vi ~/.bashrc
</pre>
<p>Insert following line in above file</p>
<pre class="brush: xml;">
export JAVA_HOME=/usr/lib/jvm/java-6-sun
</pre>
<p><a href="http://techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html"> << Back to Setting up j2ee developer environment ... </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/installing-jdk-in-ubuntulinux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up j2ee developer environment in ubuntu/linux</title>
		<link>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html</link>
		<comments>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html#comments</comments>
		<pubDate>Tue, 03 Feb 2009 18:10:37 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=110</guid>
		<description><![CDATA[A java developer machine has following most frequent tools in his machine.
1.  Sun JDK 6.0
2.  Eclispe 3.4
3.  Tomcat 6.X
4.  MySql 5
5.  Apache 2
Currently above are the popular versions, please update version if a newer version is available. Also, I have tried to list down all the necessary links and commands so that you can save [...]]]></description>
			<content:encoded><![CDATA[<p>A java developer machine has following most frequent tools in his machine.<br />
1.  <a href="http://techpitcher.com/installing-jdk-in-ubuntulinux.html">Sun JDK 6.0</a><br />
2.  <a href="http://techpitcher.com/installing-eclipse-in-ubuntulinux.html">Eclispe 3.4</a><br />
3.  <a href="http://techpitcher.com/installing-tomcat-in-ubuntulinux.html">Tomcat 6.X</a><br />
4.  <a href="http://techpitcher.com/installing-mysql-in-linux.html">MySql 5</a><br />
5.  Apache 2</p>
<p>Currently above are the popular versions, please update version if a newer version is available. Also, I have tried to list down all the necessary links and commands so that you can save time in finding these links or commands.</p>
<p>if you find something missing, please post a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/setting-up-j2ee-developer-environment-in-ubuntulinux.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Debugging vicious java.net.BindException (Windows)</title>
		<link>http://www.techpitcher.com/debugging-bindexception.html</link>
		<comments>http://www.techpitcher.com/debugging-bindexception.html#comments</comments>
		<pubDate>Thu, 22 Jan 2009 20:21:00 +0000</pubDate>
		<dc:creator>Gautam</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[BindException]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=108</guid>
		<description><![CDATA[java.net.BindException is thrown when JVM fails binding a socket to a local address and port.. Most common reason is that port is already used by some other application/service. Message like “Port already in use: 1098;” further confirms this.
This is how you can debug this exception:

Check which      service is binding the [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong><em>java.net.BindException</em></strong> is thrown when JVM fails binding a socket to a local address and port.. Most common reason is that port is already used by some other application/service. Message like “<strong>Port already in use: 1098;</strong>” further confirms this.</p>
<p class="MsoNormal">This is how you can debug this exception:</p>
<ol style="0in;" type="1">
<li class="MsoNormal">Check which      service is binding the port by command “netstat –b”</li>
</ol>
<p class="MsoNormal">This will list down all port and the application which binds the port like:</p>
<p class="MsoNormal"><strong>Proto<span> </span>Local Address<span> </span><span> </span>Foreign Address<span> </span>State<span> </span>PID</strong></p>
<p class="MsoNormal"><strong></strong>TCP<span> </span>hddlntd100000:1090<span> </span>test.test.cim:1026<span> </span><span> </span>ESTABLISHED<span> </span>2248 [OUTLOOK.EXE]</p>
<ol style="0in;" type="1">
<li class="MsoNormal">Now      check for the port which is shown as already in use. Like if the message      resulted by <em>BindException </em>is “<strong>Port already in use: 1098</strong>”, then <strong>1098 </strong>is in      use by other application.</li>
<li class="MsoNormal">Identify      the application running on the given port. Like Outlook is acquiring port      1090.</li>
<li class="MsoNormal">Either      close the application which is acquiring the port directly by exiting the      application like in case of Outlook or go to task manager and do end task      for the given application/service. If application/service closes successfully you are done, now retry whatever had caused <em>BindException</em> earlier.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/debugging-bindexception.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is singleton pattern? Write an example singleton class?</title>
		<link>http://www.techpitcher.com/what-is-singleton-pattern-write-an-example-singleton-class.html</link>
		<comments>http://www.techpitcher.com/what-is-singleton-pattern-write-an-example-singleton-class.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 17:18:34 +0000</pubDate>
		<dc:creator>Vibha</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=98</guid>
		<description><![CDATA[A singleton class is a class which has only one instance per application. Rather per JVM. This design pattern is extensively used when user needs exactly one instance. For example facade objects, state objects or for global variables (as it permits lazy allocation and initialization which may not happen in all languages).
To make a class [...]]]></description>
			<content:encoded><![CDATA[<p>A singleton class is a class which has only one instance per application. Rather per JVM. This design pattern is extensively used when user needs exactly one instance. For example facade objects, state objects or for global variables (as it permits lazy allocation and initialization which may not happen in all languages).</p>
<p>To make a class singleton, its constructor is made private or protected so that it can not be instantiated. Instead, a getInstance () method is written to return a new instance of that class if it doesn&#8217;t exist or return the reference of that object if it already exists. If it&#8217;s a multithreaded environment make sure to synchronize the getInstance() menthod.<br />
Conventional way of writing a singleton class is :</p>
<pre class="brush: java;">
public class Singleton {
private static Singleton INSTANCE = null;
// to prohibit instantiation
private Singleton() {
}

public static Singleton getInstance() {
if (INSTANCE == null) {
// lazy initialisation
INSTANCE = new Singleton();
}
return INSTANCE;
}
}
</pre>
<p>You can synchronise on getInstance() method for a multi threaded environment.</p>
<p>Another thread-safe Java programming language lazy-loaded solution is:</p>
<pre class="brush: java;">
public class Singleton {
private Singleton() {}

// lazy initialisation
private static class SingletonHolder {
private final static Singleton INSTANCE = new Singleton();
}

public static Singleton getInstance() {
return SingletonHolder.INSTANCE;
}
}
</pre>
<p>Remember a singleton class is one instance per JVM. So if you have your application running in a cluster of servers. Every server will have its own JVM, therefore its own instance of singleton class. In this case, purpose of making a class singleton is not fulfilled. Hence this pattern should be used with care.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/what-is-singleton-pattern-write-an-example-singleton-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
