<?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: Spring and load-time weaving of Neo4j-based domain objects</title>
	<atom:link href="http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:33:28 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: activey</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-14490</link>
		<dc:creator>activey</dc:creator>
		<pubDate>Wed, 28 Oct 2009 09:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-14490</guid>
		<description>Matias,

Can you attach project source code?</description>
		<content:encoded><![CDATA[<p>Matias,</p>
<p>Can you attach project source code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: open source testing tools</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-11156</link>
		<dc:creator>open source testing tools</dc:creator>
		<pubDate>Sat, 05 Sep 2009 08:12:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-11156</guid>
		<description>wow....good effort buddy</description>
		<content:encoded><![CDATA[<p>wow&#8230;.good effort buddy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tk</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5462</link>
		<dc:creator>tk</dc:creator>
		<pubDate>Sat, 30 May 2009 03:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5462</guid>
		<description>Jan: that’s very helpful.  I like that approach, thanks!</description>
		<content:encoded><![CDATA[<p>Jan: that’s very helpful.  I like that approach, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Kronquist</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5298</link>
		<dc:creator>Jan Kronquist</dc:creator>
		<pubDate>Thu, 28 May 2009 08:05:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5298</guid>
		<description>I haven&#039;t used neo4j, but maybe you could do something similar to Hibernate, ie keep the transaction open in the view using a servlet Filter. 

See the Hibernate docs here: https://www.hibernate.org/43.html</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t used neo4j, but maybe you could do something similar to Hibernate, ie keep the transaction open in the view using a servlet Filter. </p>
<p>See the Hibernate docs here: <a href="https://www.hibernate.org/43.html" rel="nofollow">https://www.hibernate.org/43.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tk</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5292</link>
		<dc:creator>tk</dc:creator>
		<pubDate>Wed, 27 May 2009 23:39:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5292</guid>
		<description>In my case, the controller does not actually handle the rendering of the view (JSP) so annotating the controller does not help.

I might just end up plucking property values into request attributes for my JSP to pick up.  I really just want to pass in my domain objects but creating a value object from my (node wrapper) domain object just defeats the point doesn&#039;t it?</description>
		<content:encoded><![CDATA[<p>In my case, the controller does not actually handle the rendering of the view (JSP) so annotating the controller does not help.</p>
<p>I might just end up plucking property values into request attributes for my JSP to pick up.  I really just want to pass in my domain objects but creating a value object from my (node wrapper) domain object just defeats the point doesn&#8217;t it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattias Ask</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5289</link>
		<dc:creator>Mattias Ask</dc:creator>
		<pubDate>Wed, 27 May 2009 08:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5289</guid>
		<description>Nice to hear that you&#039;ve solved the problem in a similar way, tk :)

I see two solutions to your dilemma:
1. Create simple view-VOs that hold the property values of the Node.
2. Set the transaction annotation on the controller instead of the service.

The first alternative is some work. But if you want to pass your domain around, another alternative is to create a DetachedNode which just creates a HashMap of the property values of the Node and that implements the Node interface. This has a whole bunch of other problems (like traversers, relations etc.), but it&#039;s less code to write if you want to pass detached properties out of the TX scope.

The second alternative can be a bit risky since you can make changes to the DB in your controller, but it&#039;s sure to be fast since you only need one TX per request.

Personally, I put the TX around the controller that populates the view. I don&#039;t know if it&#039;s correct, but it feels like the lowest hanging fruit :)

Does anyone else have any thoughts on this?</description>
		<content:encoded><![CDATA[<p>Nice to hear that you&#8217;ve solved the problem in a similar way, tk <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I see two solutions to your dilemma:<br />
1. Create simple view-VOs that hold the property values of the Node.<br />
2. Set the transaction annotation on the controller instead of the service.</p>
<p>The first alternative is some work. But if you want to pass your domain around, another alternative is to create a DetachedNode which just creates a HashMap of the property values of the Node and that implements the Node interface. This has a whole bunch of other problems (like traversers, relations etc.), but it&#8217;s less code to write if you want to pass detached properties out of the TX scope.</p>
<p>The second alternative can be a bit risky since you can make changes to the DB in your controller, but it&#8217;s sure to be fast since you only need one TX per request.</p>
<p>Personally, I put the TX around the controller that populates the view. I don&#8217;t know if it&#8217;s correct, but it feels like the lowest hanging fruit <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Does anyone else have any thoughts on this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tk</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5285</link>
		<dc:creator>tk</dc:creator>
		<pubDate>Tue, 26 May 2009 23:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5285</guid>
		<description>I have been playing around with neo4j and so far, have independently done more or less the same thing as you, including the NodeDelegate wrapper.  It is good to see someone else thinking the same.

How do you plan on getting around the fact that pretty much all operations on a node object require a transaction block?  It is easy enough inside the service layer with annotation markers but what about when you pass your domain model to your view?

I thought about introducing the transaction block in the getProperty method in the node delegate base class but that means I have to inject a NeoService reference into every node. 

Your thoughts?</description>
		<content:encoded><![CDATA[<p>I have been playing around with neo4j and so far, have independently done more or less the same thing as you, including the NodeDelegate wrapper.  It is good to see someone else thinking the same.</p>
<p>How do you plan on getting around the fact that pretty much all operations on a node object require a transaction block?  It is easy enough inside the service layer with annotation markers but what about when you pass your domain model to your view?</p>
<p>I thought about introducing the transaction block in the getProperty method in the node delegate base class but that means I have to inject a NeoService reference into every node. </p>
<p>Your thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattias Ask</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5280</link>
		<dc:creator>Mattias Ask</dc:creator>
		<pubDate>Tue, 26 May 2009 10:25:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5280</guid>
		<description>I forgot that, Emil. The only change I made was that I used the empty constructor instead of sending in &quot;null&quot; in the one that takes a Node. But on the other hand, &quot;new TweetNode(null)&quot; works equally fine :) The setting of the Node is done after the new TweetNode is instantiated.</description>
		<content:encoded><![CDATA[<p>I forgot that, Emil. The only change I made was that I used the empty constructor instead of sending in &#8220;null&#8221; in the one that takes a Node. But on the other hand, &#8220;new TweetNode(null)&#8221; works equally fine <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The setting of the Node is done after the new TweetNode is instantiated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil Eifrem</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/comment-page-1/#comment-5279</link>
		<dc:creator>Emil Eifrem</dc:creator>
		<pubDate>Tue, 26 May 2009 10:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jayway.com/?p=1773#comment-5279</guid>
		<description>Good stuff.

Any chance you could post the final UserNode.createTweet() implementation?

-EE</description>
		<content:encoded><![CDATA[<p>Good stuff.</p>
<p>Any chance you could post the final UserNode.createTweet() implementation?</p>
<p>-EE</p>
]]></content:encoded>
	</item>
</channel>
</rss>
