<?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: Injecting Domain objects with Spring</title>
	<atom:link href="http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/</link>
	<description>A weblog about software engineering, Architecture, Technology an other things we like.</description>
	<lastBuildDate>Sat, 28 Jan 2012 20:11:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Setya</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-31234</link>
		<dc:creator>Setya</dc:creator>
		<pubDate>Mon, 13 Jun 2011 08:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-31234</guid>
		<description>Hi,

If I add a method in my unit test class which contains the entity as one of the parameters why the dependency won&#039;t get injected ?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>If I add a method in my unit test class which contains the entity as one of the parameters why the dependency won&#8217;t get injected ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Marcolino</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-30180</link>
		<dc:creator>Eduardo Marcolino</dc:creator>
		<pubDate>Wed, 17 Mar 2010 17:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-30180</guid>
		<description>Hi Allard,

I just solved my problem with your nice Article.
In my case, i&#039;m using weblogic 10 and i wanted to inject the beans into the PageFlowController&#039;s

Thank you and congratulations for the great job.</description>
		<content:encoded><![CDATA[<p>Hi Allard,</p>
<p>I just solved my problem with your nice Article.<br />
In my case, i&#8217;m using weblogic 10 and i wanted to inject the beans into the PageFlowController&#8217;s</p>
<p>Thank you and congratulations for the great job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gridshore &#187; The power of immutability in a Rich Domain Model</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-20735</link>
		<dc:creator>Gridshore &#187; The power of immutability in a Rich Domain Model</dc:creator>
		<pubDate>Tue, 07 Apr 2009 07:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-20735</guid>
		<description>[...] However, I have been investigating the rich domain model pattern lately (as you can read in my previous post) and more importantly, a good migration path for “transaction script” developers to get [...]</description>
		<content:encoded><![CDATA[<p>[...] However, I have been investigating the rich domain model pattern lately (as you can read in my previous post) and more importantly, a good migration path for “transaction script” developers to get [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twice</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15697</link>
		<dc:creator>Twice</dc:creator>
		<pubDate>Mon, 02 Feb 2009 21:44:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15697</guid>
		<description>Hi Allard,
It&#039;s true one has to be careful when instantiating new objects and from your comments in here and James&#039;s blog I&#039;m swayed to conclude that @Configurable provides the better option. Thanks to you and James for interesting and useful entries.</description>
		<content:encoded><![CDATA[<p>Hi Allard,<br />
It&#8217;s true one has to be careful when instantiating new objects and from your comments in here and James&#8217;s blog I&#8217;m swayed to conclude that @Configurable provides the better option. Thanks to you and James for interesting and useful entries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allard</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15611</link>
		<dc:creator>Allard</dc:creator>
		<pubDate>Fri, 30 Jan 2009 16:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15611</guid>
		<description>Hi James,

I have to admit I have been reading your blog at a high-pace, so I had probably missed what you just said. It is still on my to-read list. Thanks for your comment!</description>
		<content:encoded><![CDATA[<p>Hi James,</p>
<p>I have to admit I have been reading your blog at a high-pace, so I had probably missed what you just said. It is still on my to-read list. Thanks for your comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15609</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 30 Jan 2009 12:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15609</guid>
		<description>Hi Allard
Author of &quot;solution #4&quot; here.  I enjoyed reading your article.

With the risk of being slightly off topic, I just want to clarify one point regarding my blog article mentioned above.

The solution from my post (number 4) does not do DI for Hibernate instantiated objects only.  Instead, we tell Hibernate to use our factories to DI the newly instantiated beans. This way, both a factory method and a Hibernate instantiated bean use the same DI code.

If you were to create a bean for the first time, you would be using the factory and hence the object would also be dependency injected.</description>
		<content:encoded><![CDATA[<p>Hi Allard<br />
Author of &#8220;solution #4&#8243; here.  I enjoyed reading your article.</p>
<p>With the risk of being slightly off topic, I just want to clarify one point regarding my blog article mentioned above.</p>
<p>The solution from my post (number 4) does not do DI for Hibernate instantiated objects only.  Instead, we tell Hibernate to use our factories to DI the newly instantiated beans. This way, both a factory method and a Hibernate instantiated bean use the same DI code.</p>
<p>If you were to create a bean for the first time, you would be using the factory and hence the object would also be dependency injected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allard</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15414</link>
		<dc:creator>Allard</dc:creator>
		<pubDate>Thu, 29 Jan 2009 18:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15414</guid>
		<description>In Reply to Ben and Twice:

The spring-aspects jar also contains some abstract aspects that you can implement to define your own wiring. That way, you do not have to depend on the @Configurable annotation. Personally, I don&#039;t really mind having a dependency on Spring. How big are the odds of you changing the IoC framework? If so, you&#039;ll have to do such a big refactoring, that removing the annotation is just a little extra effort.

The problem with James&#039; solution #4 is that you only have dependencies injected when you retrieve an object from your hibernate session. When instantiating a new object, these dependencies are not available yet.</description>
		<content:encoded><![CDATA[<p>In Reply to Ben and Twice:</p>
<p>The spring-aspects jar also contains some abstract aspects that you can implement to define your own wiring. That way, you do not have to depend on the @Configurable annotation. Personally, I don&#8217;t really mind having a dependency on Spring. How big are the odds of you changing the IoC framework? If so, you&#8217;ll have to do such a big refactoring, that removing the annotation is just a little extra effort.</p>
<p>The problem with James&#8217; solution #4 is that you only have dependencies injected when you retrieve an object from your hibernate session. When instantiating a new object, these dependencies are not available yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allard</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15386</link>
		<dc:creator>Allard</dc:creator>
		<pubDate>Thu, 29 Jan 2009 15:32:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15386</guid>
		<description>In reply to Anders S:

I am currently building a small application using Domain Driven Design, just to get a feel for the point of view of &quot;the other guys&quot;. I (still) am a &quot;separate infrastructure and domain&quot; type of guy too. However, I do see that there is a valid point in DDD when they talk about reusability. DDD looks a lot dryer, but you do seem to get a lot of mixing of concerns in return. Spring&#039;s easy-to-do Load Time Weaving might offer an option here. I&#039;ll give DDD a chance, and you&#039;ll see my results on this blog as soon as I am done investigating.</description>
		<content:encoded><![CDATA[<p>In reply to Anders S:</p>
<p>I am currently building a small application using Domain Driven Design, just to get a feel for the point of view of &#8220;the other guys&#8221;. I (still) am a &#8220;separate infrastructure and domain&#8221; type of guy too. However, I do see that there is a valid point in DDD when they talk about reusability. DDD looks a lot dryer, but you do seem to get a lot of mixing of concerns in return. Spring&#8217;s easy-to-do Load Time Weaving might offer an option here. I&#8217;ll give DDD a chance, and you&#8217;ll see my results on this blog as soon as I am done investigating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twice</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15184</link>
		<dc:creator>Twice</dc:creator>
		<pubDate>Wed, 28 Jan 2009 23:05:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15184</guid>
		<description>Nice article.James Blewitt has also written another article &lt;a href=&quot;http://www.jblewitt.com/blog/?p=129&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; that explores the available domain injection options. I found his option 4 interesting and might go some way in addressing Ben&#039;s concerns.</description>
		<content:encoded><![CDATA[<p>Nice article.James Blewitt has also written another article <a href="http://www.jblewitt.com/blog/?p=129" rel="nofollow">here</a> that explores the available domain injection options. I found his option 4 interesting and might go some way in addressing Ben&#8217;s concerns.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.gridshore.nl/2009/01/27/injecting-domain-objects-with-spring/comment-page-1/#comment-15160</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 28 Jan 2009 21:22:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.gridshore.nl/?p=641#comment-15160</guid>
		<description>Allard,

Good stuff; I know from experience how nice it would be from time to time to be able to inject managed resources into the domain layer, so I definitely like the concept. Also, I knew Spring had introduced LTW support but have never looked at it in-depth, so thanks for a clear and short article on how to get it working.

The only thing I don&#039;t like about the current set-up, though, is that it relies on an annotation. This visibly binds the code to Spring in return for DI only. For that reason, if I were to use LTW, I would consider going the last few meters and using AspectJ -- as you suggest. It&#039;s still binding to a framework that can provide the capability, but you get a little more bang for your buck.

Thanks again!

Ben.</description>
		<content:encoded><![CDATA[<p>Allard,</p>
<p>Good stuff; I know from experience how nice it would be from time to time to be able to inject managed resources into the domain layer, so I definitely like the concept. Also, I knew Spring had introduced LTW support but have never looked at it in-depth, so thanks for a clear and short article on how to get it working.</p>
<p>The only thing I don&#8217;t like about the current set-up, though, is that it relies on an annotation. This visibly binds the code to Spring in return for DI only. For that reason, if I were to use LTW, I would consider going the last few meters and using AspectJ &#8212; as you suggest. It&#8217;s still binding to a framework that can provide the capability, but you get a little more bang for your buck.</p>
<p>Thanks again!</p>
<p>Ben.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

