<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Justin Dag &#187; grails</title>
	<atom:link href="http://justindag.com/tag/grails/feed/" rel="self" type="application/rss+xml" />
	<link>http://justindag.com</link>
	<description></description>
	<lastBuildDate>Fri, 26 Mar 2010 16:29:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Custom Grails Environment Snag</title>
		<link>http://justindag.com/2008/10/custom-grails-environment-snag/</link>
		<comments>http://justindag.com/2008/10/custom-grails-environment-snag/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 03:08:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://justindag.com/?p=24</guid>
		<description><![CDATA[When creating custom Grails environments, you can&#8217;t use hyphens or Grails will complain with the following:
MissingMethodException: No signature of method: groovy.util.ConfigObject.minus() is applicable for argument types: (null) values: {null}
Change the hyphen to say an underscore, and you&#8217;re good to go.
]]></description>
			<content:encoded><![CDATA[<p>When creating custom Grails environments, you can&#8217;t use hyphens or Grails will complain with the following:</p>
<p><code>MissingMethodException: No signature of method: groovy.util.ConfigObject.minus() is applicable for argument types: (null) values: {null}</code></p>
<p>Change the hyphen to say an underscore, and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://justindag.com/2008/10/custom-grails-environment-snag/feed/</wfw:commentRss>
		<slash:comments>268</slash:comments>
		</item>
		<item>
		<title>Grails Reserved Word, &#8216;Position&#8217;</title>
		<link>http://justindag.com/2008/08/grails-reserved-word-position/</link>
		<comments>http://justindag.com/2008/08/grails-reserved-word-position/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 17:37:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://justindag.com/?p=13</guid>
		<description><![CDATA[It turns out the word &#8220;position&#8221; is a reserved word in Grails.  If you use this as one of your domain entity&#8217;s properties, Grails will not be able to create the table for your domain class.  
]]></description>
			<content:encoded><![CDATA[<p>It turns out the word &#8220;position&#8221; is a reserved word in Grails.  If you use this as one of your domain entity&#8217;s properties, Grails will not be able to create the table for your domain class.  </p>
]]></content:encoded>
			<wfw:commentRss>http://justindag.com/2008/08/grails-reserved-word-position/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Grails, Constructor Injection, and Spring Bean Builders</title>
		<link>http://justindag.com/2008/07/grails-constructor-injection-and-spring-bean-builders/</link>
		<comments>http://justindag.com/2008/07/grails-constructor-injection-and-spring-bean-builders/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:40:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://justindag.com/?p=4</guid>
		<description><![CDATA[Had a run-in with Grails and trying to wire up some custom beans using Grails&#8217;s Spring Bean Builder DSL mechanism.   I was wiring up an instance of the Apache HttpClient object, which can be constructed with HttpClientParams and/or HttpConnectionManager.  Now the Grails BB syntax expects the first argument to be the type [...]]]></description>
			<content:encoded><![CDATA[<p>Had a run-in with Grails and trying to wire up some custom beans using Grails&#8217;s Spring Bean Builder DSL mechanism.   I was wiring up an instance of the Apache HttpClient object, which can be constructed with HttpClientParams and/or HttpConnectionManager.  Now the Grails BB syntax expects the first argument to be the type you&#8217;re wiring, followed by the parameters to pass into the constructor.  Something like this:<br />
<code>httpClient(org.apache.commons.httpclient.HttpClient, defaultGlobalHttpConnectionManager)</code></p>
<p>Where httpClient is the bean name/id, <code>org.apache.commons.httpclient.HttpClient</code> is the type we&#8217;re wiring, and defaultGlobalHttpConnectionManager is some custom implementation of the HttpConnectionManager.</p>
<p>When using this Bean Builder syntax, Grails gets consfused about the argument ordering and is unable to create its Grails Application Context.  I also tried the following which didn&#8217;t work either.<br />
<code>httpClient(org.apache.commons.httpclient.HttpClient, null,<br />
defaultGlobalHttpConnectionManager)</code></p>
<p>I don&#8217;t know if you can explicitly set the arguments the same way you can in the standard XML wiring approach.   My solution was then to use the tried and true method.</p>
<p><code>&lt;bean id="defaultGlobalHttpConnectionManager"<br />
class="com.site.commons.http.GlobalHttpConnectionManager"<br />
destroy-method="shutDown" lazy-init="default" autowire="default"<br />
dependency-check="default"&gt;<br />
&lt;property name="soTimeout"&gt;<br />
&lt;value&gt;20000&lt;/value&gt;<br />
&lt;/property&gt;<br />
&lt;property name="connectionTimeout"&gt;<br />
&lt;value&gt;20000&lt;/value &gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</code><br />
<code><br />
&lt;bean id="httpClient"<br />
class="org.apache.commons.httpclient.HttpClient" lazy-init="default"<br />
autowire="default"<br />
dependency-check="default"&gt;<br />
&lt;constructor-arg ref="defaultGlobalHttpConnectionManager" /&gt;<br />
&lt;/bean&gt;<br />
</code><br />
<strong>Resources:</strong><br />
<a href="http://grails.org/doc/1.0.x/">http://grails.org/doc/1.0.x/</a><br />
<a href="http://hc.apache.org/httpclient-3.x/apidocs/index.html">http://hc.apache.org/httpclient-3.x/apidocs/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://justindag.com/2008/07/grails-constructor-injection-and-spring-bean-builders/feed/</wfw:commentRss>
		<slash:comments>186</slash:comments>
		</item>
	</channel>
</rss>

