<?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: Neo4j Grails Plugin</title>
	<atom:link href="http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/</link>
	<description>Real world fun with Java, Grails, Groovy, Zope, Plone, Linux and much others.</description>
	<lastBuildDate>Mon, 19 Jul 2010 13:53:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stefan Armbruster</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-11</link>
		<dc:creator>Stefan Armbruster</dc:creator>
		<pubDate>Sat, 03 Oct 2009 16:13:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-11</guid>
		<description>withTransaction is part of the domain class extensions being provided by the persistence plugin. The Neo4j plugin currently does not implement this.</description>
		<content:encoded><![CDATA[<p>withTransaction is part of the domain class extensions being provided by the persistence plugin. The Neo4j plugin currently does not implement this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mustang</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-10</link>
		<dc:creator>Mustang</dc:creator>
		<pubDate>Sat, 03 Oct 2009 13:29:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-10</guid>
		<description>This is more elegant, does it work too? 

http://grails.org/doc/1.1.x/ref/Domain%20Classes/withTransaction.html</description>
		<content:encoded><![CDATA[<p>This is more elegant, does it work too? </p>
<p><a href="http://grails.org/doc/1.1.x/ref/Domain%20Classes/withTransaction.html" rel="nofollow">http://grails.org/doc/1.1.x/ref/Domain%20Classes/withTransaction.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Armbruster</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-9</link>
		<dc:creator>Stefan Armbruster</dc:creator>
		<pubDate>Sat, 03 Oct 2009 10:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-9</guid>
		<description>Every call to the Neo API has to be done within a transaction. During normal requests the plugin uses a similar approach to Hibernate&#039;s OpenSessionInView with the difference that it opens a Transaction. This works fine so far, but I think there might be a better solution. Regarding your question, here&#039;s a Bootstrap.groovy from one of my internal projects:
&lt;pre&gt;import org.springframework.transaction.PlatformTransactionManager
import org.springframework.transaction.support.TransactionTemplate
import org.springframework.transaction.support.TransactionCallback

class BootStrap {

     PlatformTransactionManager transactionManager

     def init = { servletContext -&gt;

         def result = new TransactionTemplate(transactionManager).execute({ status -&gt;
             // setup Roles
             if (!Role.list()) {
                 log.error &quot;added roles&quot;
                     new Role(authority:&quot;ROLE_USER&quot;).save()
             }
         } as TransactionCallback)
     }
     def destroy = {
     }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Every call to the Neo API has to be done within a transaction. During normal requests the plugin uses a similar approach to Hibernate&#8217;s OpenSessionInView with the difference that it opens a Transaction. This works fine so far, but I think there might be a better solution. Regarding your question, here&#8217;s a Bootstrap.groovy from one of my internal projects:</p>
<pre>import org.springframework.transaction.PlatformTransactionManager
import org.springframework.transaction.support.TransactionTemplate
import org.springframework.transaction.support.TransactionCallback

class BootStrap {

     PlatformTransactionManager transactionManager

     def init = { servletContext ->

         def result = new TransactionTemplate(transactionManager).execute({ status ->
             // setup Roles
             if (!Role.list()) {
                 log.error "added roles"
                     new Role(authority:"ROLE_USER").save()
             }
         } as TransactionCallback)
     }
     def destroy = {
     }
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stig Lau</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-8</link>
		<dc:creator>Stig Lau</dc:creator>
		<pubDate>Sat, 03 Oct 2009 10:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-8</guid>
		<description>Very nice, worked like a charm.
The next question is; do you have an example of what the code has to look like when you write it in &quot;grails console&quot; or grails-app/conf/BootStrap?

My test:
new Car(colour:&quot;Blue&quot;).save()

Results in: 
Exception thrown: No transaction found for current thread
org.neo4j.api.core.NotInTransactionException: No transaction found for current thread
at org.neo4j.impl.persistence.PersistenceManager.getCurrentTransaction...

I believe this has to be done in the context of a transaction, and Grails doc does not tell me how.</description>
		<content:encoded><![CDATA[<p>Very nice, worked like a charm.<br />
The next question is; do you have an example of what the code has to look like when you write it in &#8220;grails console&#8221; or grails-app/conf/BootStrap?</p>
<p>My test:<br />
new Car(colour:&#8221;Blue&#8221;).save()</p>
<p>Results in:<br />
Exception thrown: No transaction found for current thread<br />
org.neo4j.api.core.NotInTransactionException: No transaction found for current thread<br />
at org.neo4j.impl.persistence.PersistenceManager.getCurrentTransaction&#8230;</p>
<p>I believe this has to be done in the context of a transaction, and Grails doc does not tell me how.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitted by grailspodcast</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-7</link>
		<dc:creator>Twitted by grailspodcast</dc:creator>
		<pubDate>Fri, 02 Oct 2009 22:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-7</guid>
		<description>[...] This post was Twitted by grailspodcast [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was Twitted by grailspodcast [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitted by groovytweets</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-6</link>
		<dc:creator>Twitted by groovytweets</dc:creator>
		<pubDate>Fri, 02 Oct 2009 22:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-6</guid>
		<description>[...] This post was Twitted by groovytweets [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was Twitted by groovytweets [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitted by groovyblogs</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-5</link>
		<dc:creator>Twitted by groovyblogs</dc:creator>
		<pubDate>Fri, 02 Oct 2009 20:27:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-5</guid>
		<description>[...] This post was Twitted by groovyblogs [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was Twitted by groovyblogs [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armbruster IT Blog &#187; Example for using Neo4j with Grails</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-4</link>
		<dc:creator>Armbruster IT Blog &#187; Example for using Neo4j with Grails</dc:creator>
		<pubDate>Fri, 02 Oct 2009 20:07:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-4</guid>
		<description>[...] reply to my today&#8217;s annoncement of the Neo4j Grails plugin, @StigLau asked me to provide an example for using the Neo4j Grails [...]</description>
		<content:encoded><![CDATA[<p>[...] reply to my today&#8217;s annoncement of the Neo4j Grails plugin, @StigLau asked me to provide an example for using the Neo4j Grails [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets die Armbruster IT Blog » Neo4j Grails Plugin erwähnt -- Topsy.com</title>
		<link>http://blog.armbruster-it.de/2009/10/neo4j-grails-plugin/comment-page-1/#comment-2</link>
		<dc:creator>Tweets die Armbruster IT Blog » Neo4j Grails Plugin erwähnt -- Topsy.com</dc:creator>
		<pubDate>Fri, 02 Oct 2009 17:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.armbruster-it.de/?p=22#comment-2</guid>
		<description>[...] Dieser Eintrag wurde auf Twitter von Peter Neubauer und darthvader42 erwähnt. darthvader42 sagte: just release the initial version of the #neo4j #grails plugin: http://bit.ly/d74uQ [...]</description>
		<content:encoded><![CDATA[<p>[...] Dieser Eintrag wurde auf Twitter von Peter Neubauer und darthvader42 erwähnt. darthvader42 sagte: just release the initial version of the #neo4j #grails plugin: <a href="http://bit.ly/d74uQ" rel="nofollow">http://bit.ly/d74uQ</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
