<?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: Setter injection versus constructor injection and the use of @Required</title>
	<atom:link href="http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/</link>
	<description>The voice of SpringSource</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Gal</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-206518</link>
		<dc:creator>Gal</dc:creator>
		<pubDate>Mon, 17 Oct 2011 09:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-206518</guid>
		<description>Using setter injection solves cyclic dependencies.</description>
		<content:encoded><![CDATA[<p>Using setter injection solves cyclic dependencies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mck</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-194059</link>
		<dc:creator>mck</dc:creator>
		<pubDate>Fri, 13 May 2011 15:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-194059</guid>
		<description>Maybe it&#039;s ok to just think of Field injection as an ad-hoc Service Locator.
Certainly gives you more freedom.

This article goes more in depth to that suggestion...
http://tech.finn.no/2011/05/13/dependency-injection-with-constructors/</description>
		<content:encoded><![CDATA[<p>Maybe it&#039;s ok to just think of Field injection as an ad-hoc Service Locator.<br />
Certainly gives you more freedom.</p>
<p>This article goes more in depth to that suggestion&#8230;<br />
<a href="http://tech.finn.no/2011/05/13/dependency-injection-with-constructors/" rel="nofollow">http://tech.finn.no/2011/05/13/dependency-injection-with-constructors/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: paul</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-178846</link>
		<dc:creator>paul</dc:creator>
		<pubDate>Wed, 17 Nov 2010 08:21:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-178846</guid>
		<description>great post..

i also found a spoon fed tutorial using @Required annotation

http://www.adobocode.com/spring/how-to-use-required-annotation-in-spring

hope it helps</description>
		<content:encoded><![CDATA[<p>great post..</p>
<p>i also found a spoon fed tutorial using @Required annotation</p>
<p><a href="http://www.adobocode.com/spring/how-to-use-required-annotation-in-spring" rel="nofollow">http://www.adobocode.com/spring/how-to-use-required-annotation-in-spring</a></p>
<p>hope it helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ambulans</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-170097</link>
		<dc:creator>ambulans</dc:creator>
		<pubDate>Wed, 09 Dec 2009 21:57:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-170097</guid>
		<description>Hi, very good web site. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi, very good web site. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ambulans</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-170091</link>
		<dc:creator>ambulans</dc:creator>
		<pubDate>Wed, 09 Dec 2009 16:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-170091</guid>
		<description>Hi,very good web site. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,very good web site. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: George Anderson</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-146045</link>
		<dc:creator>George Anderson</dc:creator>
		<pubDate>Wed, 11 Feb 2009 18:54:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-146045</guid>
		<description>I use setter dependency injection in my big project and constructor injection really do bother me because although this is just an application, our architecture uses a lot of inheritance and interfaces to accomplish things.

By the way, I can see one class with 40 or more dependencies. This is what we call a Façade.

Best regards,
George.</description>
		<content:encoded><![CDATA[<p>I use setter dependency injection in my big project and constructor injection really do bother me because although this is just an application, our architecture uses a lot of inheritance and interfaces to accomplish things.</p>
<p>By the way, I can see one class with 40 or more dependencies. This is what we call a Façade.</p>
<p>Best regards,<br />
George.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil Vasaikar</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-119641</link>
		<dc:creator>Nikhil Vasaikar</dc:creator>
		<pubDate>Thu, 04 Sep 2008 08:36:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-119641</guid>
		<description>The xml config for @Mandatory did not come up, this time posting without the angular brackets

bean class=&quot;org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor&quot;
		p:requiredAnnotationType=&quot;Mandatory&quot;</description>
		<content:encoded><![CDATA[<p>The xml config for @Mandatory did not come up, this time posting without the angular brackets</p>
<p>bean class=&#034;org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor&#034;<br />
		p:requiredAnnotationType=&#034;Mandatory&#034;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikhil Vasaikar</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-119639</link>
		<dc:creator>Nikhil Vasaikar</dc:creator>
		<pubDate>Thu, 04 Sep 2008 08:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-119639</guid>
		<description>Create your custom annotaion:-

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Mandatory {
}

Register this annotation with the RequiredAnnotationBeanPostProcessor



You can now use @Mandatory on the setter methods.</description>
		<content:encoded><![CDATA[<p>Create your custom annotaion:-</p>
<p>@Retention(RetentionPolicy.RUNTIME)<br />
@Target(ElementType.METHOD)<br />
public @interface Mandatory {<br />
}</p>
<p>Register this annotation with the RequiredAnnotationBeanPostProcessor</p>
<p>You can now use @Mandatory on the setter methods.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Feller</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-118036</link>
		<dc:creator>Andrew Feller</dc:creator>
		<pubDate>Fri, 22 Aug 2008 19:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-118036</guid>
		<description>Aside from constructor injection, how else can someone ensure objects are in valid states without coupling it to Spring?  I have avoided @Required and initializingBean interface because I will have to take the same classes later and plug them into a different framework that doesn&#039;t use it.</description>
		<content:encoded><![CDATA[<p>Aside from constructor injection, how else can someone ensure objects are in valid states without coupling it to Spring?  I have avoided @Required and initializingBean interface because I will have to take the same classes later and plug them into a different framework that doesn&#039;t use it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bert van Brakel</title>
		<link>http://blog.springsource.org/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/comment-page-1/#comment-113000</link>
		<dc:creator>Bert van Brakel</dc:creator>
		<pubDate>Mon, 14 Jul 2008 07:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.interface21.com/main/2007/07/11/setter-injection-versus-constructor-injection-and-the-use-of-required/#comment-113000</guid>
		<description>Oh, and using the seperate FooOpts concreate class instead of the interface is easier for spring integration, as you just create another config entry for the FooOpts bean, and pass that in as a constructor arg to the Foo bean.</description>
		<content:encoded><![CDATA[<p>Oh, and using the seperate FooOpts concreate class instead of the interface is easier for spring integration, as you just create another config entry for the FooOpts bean, and pass that in as a constructor arg to the Foo bean.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

