<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A Spring Singleton is not a Singleton</title>
	<atom:link href="http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/</link>
	<description>Jing Xue's Weblog</description>
	<lastBuildDate>Thu, 27 Oct 2011 20:25:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Spring singleton created multiple times</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-195137</link>
		<dc:creator>Spring singleton created multiple times</dc:creator>
		<pubDate>Thu, 27 Oct 2011 20:25:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-195137</guid>
		<description>[...] have read: http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/ but I don&#8217;t think I am dealing with the same class defined twice with two different bean [...]</description>
		<content:encoded><![CDATA[<p>[...] have read: <a href="http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/" rel="nofollow">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/</a> but I don&#8217;t think I am dealing with the same class defined twice with two different bean [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hansi</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-194813</link>
		<dc:creator>hansi</dc:creator>
		<pubDate>Wed, 19 Oct 2011 13:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-194813</guid>
		<description>hey! 

yes, a very old post and still interresting. just so i get this right, is there any noticeable difference to this plain java variant: 

class Foo{
  ... instance methods ... 
}



class MyApplicationThings{
  public final static FOO1 = new Foo(); 
  public final static FOO2 = new Foo(); 
}



is there any functional difference? 
(and please don&#039;t get into an argument about aesthetics, a library-less solution with fewer lines of code simply wins). 


(p.s. i&#039;m putting aside the fact here that i&#039;ve never ever had the need for having multiple instances of a singleton; and another note to that note: having multiple singletons makes my oxymoron-alarm go off, loudly).</description>
		<content:encoded><![CDATA[<p>hey! </p>
<p>yes, a very old post and still interresting. just so i get this right, is there any noticeable difference to this plain java variant: </p>
<p>class Foo{<br />
  &#8230; instance methods &#8230;<br />
}</p>
<p>class MyApplicationThings{<br />
  public final static FOO1 = new Foo();<br />
  public final static FOO2 = new Foo();<br />
}</p>
<p>is there any functional difference?<br />
(and please don&#8217;t get into an argument about aesthetics, a library-less solution with fewer lines of code simply wins). </p>
<p>(p.s. i&#8217;m putting aside the fact here that i&#8217;ve never ever had the need for having multiple instances of a singleton; and another note to that note: having multiple singletons makes my oxymoron-alarm go off, loudly).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramya</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-191795</link>
		<dc:creator>Ramya</dc:creator>
		<pubDate>Thu, 18 Aug 2011 11:01:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-191795</guid>
		<description>I am wondering about the example above. The foo1 and foo2 create 2 instances. Does that really work? If so, then doesnt the whole concept of the &#039;singleton&#039; in spring terms become invalid?</description>
		<content:encoded><![CDATA[<p>I am wondering about the example above. The foo1 and foo2 create 2 instances. Does that really work? If so, then doesnt the whole concept of the &#8217;singleton&#8217; in spring terms become invalid?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepesh</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-188200</link>
		<dc:creator>Deepesh</dc:creator>
		<pubDate>Fri, 03 Jun 2011 11:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-188200</guid>
		<description>Five year old post but still useful.</description>
		<content:encoded><![CDATA[<p>Five year old post but still useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-178880</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 12 Nov 2010 07:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-178880</guid>
		<description>here is a best differentiation of the singleton vs. the prototype scopes of Spring Framework

http://www.adobocode.com/spring/springs-scopes-singleton-vs-prototype</description>
		<content:encoded><![CDATA[<p>here is a best differentiation of the singleton vs. the prototype scopes of Spring Framework</p>
<p><a href="http://www.adobocode.com/spring/springs-scopes-singleton-vs-prototype" rel="nofollow">http://www.adobocode.com/spring/springs-scopes-singleton-vs-prototype</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lwpro2</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-176548</link>
		<dc:creator>lwpro2</dc:creator>
		<pubDate>Fri, 01 Oct 2010 06:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-176548</guid>
		<description>They are two different implementations. Spring is using bean factory load instance from start up, then cache it; which behaves as single instance for all. Strict singleton pattern is static class variable, and never the instance can be publicly created.</description>
		<content:encoded><![CDATA[<p>They are two different implementations. Spring is using bean factory load instance from start up, then cache it; which behaves as single instance for all. Strict singleton pattern is static class variable, and never the instance can be publicly created.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sravan</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-176438</link>
		<dc:creator>Sravan</dc:creator>
		<pubDate>Mon, 27 Sep 2010 14:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-176438</guid>
		<description>Thanks Jing.
Thats a very useful article.
One question.
When a bean is singleton for &quot;Spring IoC container&quot;, the entire application will have access to only the same SINGLE instance of the bean(as most applications contain only one ApplicationContext). 
So, what is the advantage we see here by making all of our beans Singleton (other than configuring) ? (as, for our application its still a Singleton, can see just like a class loader singleton) ?</description>
		<content:encoded><![CDATA[<p>Thanks Jing.<br />
Thats a very useful article.<br />
One question.<br />
When a bean is singleton for &#8220;Spring IoC container&#8221;, the entire application will have access to only the same SINGLE instance of the bean(as most applications contain only one ApplicationContext).<br />
So, what is the advantage we see here by making all of our beans Singleton (other than configuring) ? (as, for our application its still a Singleton, can see just like a class loader singleton) ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-174814</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 31 Aug 2010 13:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-174814</guid>
		<description>good~ thanks!</description>
		<content:encoded><![CDATA[<p>good~ thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amal</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-155326</link>
		<dc:creator>Amal</dc:creator>
		<pubDate>Mon, 11 Jan 2010 02:26:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-155326</guid>
		<description>Very well explained. Always wondered about the fine differences between the two. Thanks for the explanation!</description>
		<content:encoded><![CDATA[<p>Very well explained. Always wondered about the fine differences between the two. Thanks for the explanation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JEx</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-149070</link>
		<dc:creator>JEx</dc:creator>
		<pubDate>Fri, 30 Oct 2009 08:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-149070</guid>
		<description>Perfectly nice One!!!</description>
		<content:encoded><![CDATA[<p>Perfectly nice One!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thamayanthi</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-137393</link>
		<dc:creator>Thamayanthi</dc:creator>
		<pubDate>Thu, 25 Jun 2009 12:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-137393</guid>
		<description>Nice Explanation!!!</description>
		<content:encoded><![CDATA[<p>Nice Explanation!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shan</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-137181</link>
		<dc:creator>shan</dc:creator>
		<pubDate>Mon, 22 Jun 2009 05:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-137181</guid>
		<description>I it very nice explanation. So you are gonna say Spring developers have to take a special consideration in this regard.</description>
		<content:encoded><![CDATA[<p>I it very nice explanation. So you are gonna say Spring developers have to take a special consideration in this regard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaa</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-135739</link>
		<dc:creator>jaa</dc:creator>
		<pubDate>Tue, 09 Jun 2009 05:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-135739</guid>
		<description>In this context, it&#039;s also useful to note that by default Spring beans are singleton - i.e even if you don&#039;t specify singleton=&quot;true&quot; or scope=&quot;singleton&quot;, it&#039;s created as a Spring-Singleton. So, there are certain cases where we need to explicitly say scope=&quot;prototype&quot; to avoid multithreaded issues.</description>
		<content:encoded><![CDATA[<p>In this context, it&#8217;s also useful to note that by default Spring beans are singleton &#8211; i.e even if you don&#8217;t specify singleton=&#8221;true&#8221; or scope=&#8221;singleton&#8221;, it&#8217;s created as a Spring-Singleton. So, there are certain cases where we need to explicitly say scope=&#8221;prototype&#8221; to avoid multithreaded issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pawan</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-130620</link>
		<dc:creator>Pawan</dc:creator>
		<pubDate>Thu, 16 Apr 2009 19:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-130620</guid>
		<description>Very Nicely Explained !</description>
		<content:encoded><![CDATA[<p>Very Nicely Explained !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parag Soman</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-106537</link>
		<dc:creator>Parag Soman</dc:creator>
		<pubDate>Thu, 28 Aug 2008 20:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-106537</guid>
		<description>Thanks a lot for this article and removing my confusion.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this article and removing my confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raish</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-80424</link>
		<dc:creator>Raish</dc:creator>
		<pubDate>Fri, 04 Apr 2008 13:59:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-80424</guid>
		<description>Good explanation, thnk!</description>
		<content:encoded><![CDATA[<p>Good explanation, thnk!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pwu</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-46745</link>
		<dc:creator>pwu</dc:creator>
		<pubDate>Wed, 12 Sep 2007 20:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-46745</guid>
		<description>very well explained! thanx</description>
		<content:encoded><![CDATA[<p>very well explained! thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: freizl</title>
		<link>http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/comment-page-1/#comment-14279</link>
		<dc:creator>freizl</dc:creator>
		<pubDate>Fri, 22 Sep 2006 09:03:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/09/14/a-spring-singleton-is-not-a-singleton/#comment-14279</guid>
		<description>good article about this confusion!
and there is a section in the  RD J Chapter 4,&#039;Avoid a Proliferation of Singletons by Using an Application Registry&#039;, seem to also talk about this issue.</description>
		<content:encoded><![CDATA[<p>good article about this confusion!<br />
and there is a section in the  RD J Chapter 4,&#8217;Avoid a Proliferation of Singletons by Using an Application Registry&#8217;, seem to also talk about this issue.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

