<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Lazy bean instantiation in Spring 2.0</title>
	<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/</link>
	<description>Exploring the Spring Framework and Application Development</description>
	<pubDate>Thu, 28 Aug 2008 23:14:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>

	<item>
		<title>By: Chris</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-582</link>
		<author>Chris</author>
		<pubDate>Mon, 05 Jun 2006 18:41:08 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-582</guid>
					<description>Unless I am misunderstanding your post or you are mistaken. The lazy-init attribute has been available since at least Spring 1.1... perhaps earlier. You can also specify the entire bean context file to default to laziness by setting the default-lazy-init attribute of the beans element to true.

I have not poked around into the source to ensure that its working 100% correctly, but we use and have seen the lazy behavior working in our application.

Maybe some bugs have been fixed or maybe it's now a little lazier? :-)</description>
		<content:encoded><![CDATA[<p>Unless I am misunderstanding your post or you are mistaken. The lazy-init attribute has been available since at least Spring 1.1&#8230; perhaps earlier. You can also specify the entire bean context file to default to laziness by setting the default-lazy-init attribute of the beans element to true.</p>
<p>I have not poked around into the source to ensure that its working 100% correctly, but we use and have seen the lazy behavior working in our application.</p>
<p>Maybe some bugs have been fixed or maybe it&#8217;s now a little lazier? <img src='http://www.memestorm.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-583</link>
		<author>Jon</author>
		<pubDate>Mon, 05 Jun 2006 19:13:27 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-583</guid>
					<description>Hey Chris,

I just checked in the 1.2 documentation, and it is indeed there-hidden away.

I didn't know about it until recently...Thanks for the heads up.

Jon</description>
		<content:encoded><![CDATA[<p>Hey Chris,</p>
<p>I just checked in the 1.2 documentation, and it is indeed there-hidden away.</p>
<p>I didn&#8217;t know about it until recently&#8230;Thanks for the heads up.</p>
<p>Jon</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Colin Sampaleanu</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-584</link>
		<author>Colin Sampaleanu</author>
		<pubDate>Tue, 06 Jun 2006 00:52:10 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-584</guid>
					<description>lazy-init has actually been in there for a long, long time...

The &lt;i&gt;default&lt;/i&gt; behavior in Spring has always been to eagerly instantiate singletons, and lazily instantiate prototype (non-singleton) beans.

However, it's been possible to turn on lazy init for singletons as well, since well before Spring 1.0, by using the lazy-init attribute. Looking back in the logs, this capability appeared on Nov. 5, 2003.

Colin</description>
		<content:encoded><![CDATA[<p>lazy-init has actually been in there for a long, long time&#8230;</p>
<p>The <i>default</i> behavior in Spring has always been to eagerly instantiate singletons, and lazily instantiate prototype (non-singleton) beans.</p>
<p>However, it&#8217;s been possible to turn on lazy init for singletons as well, since well before Spring 1.0, by using the lazy-init attribute. Looking back in the logs, this capability appeared on Nov. 5, 2003.</p>
<p>Colin</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-587</link>
		<author>Jon</author>
		<pubDate>Tue, 06 Jun 2006 05:46:11 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-587</guid>
					<description>Hi Colin,

As noted in my earlier comment, I acknowledge this fact. I thought it was new....Still, I find it a nice little feature...

Regards, Jon</description>
		<content:encoded><![CDATA[<p>Hi Colin,</p>
<p>As noted in my earlier comment, I acknowledge this fact. I thought it was new&#8230;.Still, I find it a nice little feature&#8230;</p>
<p>Regards, Jon</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Twice</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-595</link>
		<author>Twice</author>
		<pubDate>Tue, 06 Jun 2006 21:43:21 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-595</guid>
					<description>Nevertheless it's a good pointer to those who might have missed it or couldn't identify a usecase for it. Keep up the good work.

Thanks
Twice.</description>
		<content:encoded><![CDATA[<p>Nevertheless it&#8217;s a good pointer to those who might have missed it or couldn&#8217;t identify a usecase for it. Keep up the good work.</p>
<p>Thanks<br />
Twice.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-1275</link>
		<author>Scott</author>
		<pubDate>Tue, 08 Aug 2006 15:02:32 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-1275</guid>
					<description>One really handy use of lazy-init I've found is to specify my JNDI data source bean as lazy, so that when I'm testing things using another internal (C3P0) data source, the JNDI one is never actually instantiated, which means the app's initialization doesn't bomb out.  This makes it really easy to transparently switch between configurations using only properties files.</description>
		<content:encoded><![CDATA[<p>One really handy use of lazy-init I&#8217;ve found is to specify my JNDI data source bean as lazy, so that when I&#8217;m testing things using another internal (C3P0) data source, the JNDI one is never actually instantiated, which means the app&#8217;s initialization doesn&#8217;t bomb out.  This makes it really easy to transparently switch between configurations using only properties files.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Matteo</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-2613</link>
		<author>Matteo</author>
		<pubDate>Mon, 20 Nov 2006 17:33:45 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-2613</guid>
					<description>Hi,
how can i discover the status of a "lazy" bean?
I mean, how can i know if the bean is active or not?

Thanks,


Matteo</description>
		<content:encoded><![CDATA[<p>Hi,<br />
how can i discover the status of a &#8220;lazy&#8221; bean?<br />
I mean, how can i know if the bean is active or not?</p>
<p>Thanks,</p>
<p>Matteo</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Jan Hoeve</title>
		<link>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-27736</link>
		<author>Jan Hoeve</author>
		<pubDate>Tue, 11 Sep 2007 18:01:17 +0000</pubDate>
		<guid>http://www.memestorm.com/blog/lazy-bean-instantiation-in-spring-20/#comment-27736</guid>
					<description>A little bit late :) but i wrote a blog on this: http://janhoeve.blogspot.com/2007/08/speedup-development-by-making-spring.html

I present a way to make all spring beans lazy at development time.
This way you can speed up the code/build/deploy/test cycle.</description>
		<content:encoded><![CDATA[<p>A little bit late <img src='http://www.memestorm.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> but i wrote a blog on this: <a href="http://janhoeve.blogspot.com/2007/08/speedup-development-by-making-spring.html" rel="nofollow">http://janhoeve.blogspot.com/2007/08/speedup-development-by-making-spring.html</a></p>
<p>I present a way to make all spring beans lazy at development time.<br />
This way you can speed up the code/build/deploy/test cycle.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
