<?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/"
	>

<channel>
	<title>Dyn Solutions &#187; Grails</title>
	<atom:link href="http://blog.dyn-solutions.com/category/grails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dyn-solutions.com</link>
	<description>dyn's blog</description>
	<pubDate>Fri, 11 Mar 2011 17:50:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GrailsCertification.com is now online!</title>
		<link>http://blog.dyn-solutions.com/2009/12/grailscertificationcom-is-now-online/</link>
		<comments>http://blog.dyn-solutions.com/2009/12/grailscertificationcom-is-now-online/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 19:09:05 +0000</pubDate>
		<dc:creator>dyn</dc:creator>
		
		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Certification]]></category>

		<category><![CDATA[Groovy]]></category>

		<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://blog.dyn-solutions.com/?p=29</guid>
		<description><![CDATA[Our new site: www.grailscertification.com is now online!
In this site, users can test their knowledge of the Grails Web framework.
There are 5 types of certifications: rookie, junior groovy, groovy, guru and holy grail, each of them with different levels.
Users can also submit questions to collaborate with our question database. Our aim is to have the biggest [...]]]></description>
			<content:encoded><![CDATA[<p>Our new site: <a href="http://www.grailscertification.com">www.grailscertification.com</a> is now online!</p>
<p>In this site, users can test their knowledge of the Grails Web framework.</p>
<p>There are 5 types of certifications: rookie, junior groovy, groovy, guru and holy grail, each of them with different levels.</p>
<p>Users can also submit questions to collaborate with our question database. Our aim is to have the biggest Grails question database online!</p>
<p>What are you waiting for? Test your skills right now: <a href="http://www.grailscertification.com">www.grailscertification.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dyn-solutions.com/2009/12/grailscertificationcom-is-now-online/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grails and EJB2.1 integration</title>
		<link>http://blog.dyn-solutions.com/2009/08/grails-and-ejb21-integration/</link>
		<comments>http://blog.dyn-solutions.com/2009/08/grails-and-ejb21-integration/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 13:09:07 +0000</pubDate>
		<dc:creator>dyn</dc:creator>
		
		<category><![CDATA[Grails]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[ejb]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[services]]></category>

		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://blog.dyn-solutions.com/?p=16</guid>
		<description><![CDATA[If you are working on a Grails project and you want to use existing business logic from EJB2.1 inside your application, you can easily achive this using Spring.
The first step is to include the Beans you want to use, inside your conf/spring/resources.groovy file like this:
12345678910111213141516171819beans = &#123;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;ejbJndi&#40;org.springframework.jndi.JndiTemplate&#41;&#123;
&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working on a Grails project and you want to use existing business logic from EJB2.1 inside your application, you can easily achive this using Spring.</p>
<p>The first step is to include the Beans you want to use, inside your <strong>conf/spring/resources.groovy</strong> file like this:</p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">beans <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ejbJndi<span style="color: #66cc66;">&#40;</span>org.<span style="color: #006600;">springframework</span>.<span style="color: #006600;">jndi</span>.<span style="color: #006600;">JndiTemplate</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;environment <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;java.naming.factory.initial&quot;</span> : <span style="color: #ff0000;">&quot;org.jnp.interfaces.NamingContextFactory&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;java.naming.provider.url&quot;</span> : <span style="color: #ff0000;">&quot;jnp://localhost:1099&quot;</span><span style="color: #66cc66;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;businessBean<span style="color: #66cc66;">&#40;</span>org.<span style="color: #006600;">springframework</span>.<span style="color: #006600;">ejb</span>.<span style="color: #006600;">access</span>.<span style="color: #006600;">SimpleRemoteStatelessSessionProxyFactoryBean</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jndiName <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;EJBBusinessBean&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;businessInterface <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;com.my.ejb.EJBBusinessBean&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jndiTemplate <span style="color: #66cc66;">=</span> ref<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ejbJndi&quot;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;personBean<span style="color: #66cc66;">&#40;</span>org.<span style="color: #006600;">springframework</span>.<span style="color: #006600;">ejb</span>.<span style="color: #006600;">access</span>.<span style="color: #006600;">SimpleRemoteStatelessSessionProxyFactoryBean</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jndiName <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;EJBPerson&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;businessInterface <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;com.my.ejb.EJBPerson&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jndiTemplate <span style="color: #66cc66;">=</span> ref<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;ejbJndi&quot;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>Then you can use any of the defined Beans inside your services or controllers like this:</p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyService <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">def</span> personBean <span style="color: #808080; font-style: italic;">//spring injects the bean automatically</span><br />
<br />
&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">def</span> myMethod<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;personBean.<span style="color: #006600;">list</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s it!<br />
Just remember to include the required JAR files (the EJB jars and the jars required to connect to the container, for instance, JBoss)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dyn-solutions.com/2009/08/grails-and-ejb21-integration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grails Tips Part I – Domain Classes</title>
		<link>http://blog.dyn-solutions.com/2009/06/grails-tips-part-i-%e2%80%93-domain-classes/</link>
		<comments>http://blog.dyn-solutions.com/2009/06/grails-tips-part-i-%e2%80%93-domain-classes/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 17:27:16 +0000</pubDate>
		<dc:creator>dyn</dc:creator>
		
		<category><![CDATA[Grails]]></category>

		<guid isPermaLink="false">http://blog.dyn-solutions.com/?p=3</guid>
		<description><![CDATA[
I have been working a lot with Grails lately and I have to say that I love it! 
 
It has allowed me to create some great web applications in a very fast and reliable way. While developing these applications, I learned a lot of useful things that I would like to share to you. [...]]]></description>
			<content:encoded><![CDATA[<p><!--[endif]--></p>
<p class="MsoNormal"><span lang="EN-GB">I have been working a lot with Grails lately and I have to say that I love it! </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">It has allowed me to create some great web applications in a very fast and reliable way. While developing these applications, I learned a lot of useful things that I would like to share to you. Today I’ll give you some tips regarding Domain Classes.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">1) Date created &amp; Last Updated</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">If you want Grails to handle the date in which an object is created and the last time it was updated, all you have to do is add the following attributes to your domain class:</span></p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #aaaadd; font-weight: bold;">Date</span> dateCreated<br />
<span style="color: #aaaadd; font-weight: bold;">Date</span> lastUpdated</div></td></tr></tbody></table></div>
<p class="MsoNormal"><span lang="EN-GB">As easy as that! Grails will automatically set the value for this two attributes when an object is created and every time it is updated.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">2) Field order</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">If you want Grails to generate the fields for the create, edit &amp; show views in a particular order, just define that order on the constraints. If the attribute doesn’t require a specific constraint (such as maxSize, unique, nullable, etc), just put the attribute on the constraints and leave the constraint empty.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">static</span> constraints <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; name<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; address<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; city<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">true</span>, blank:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; phone<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">true</span>, blank:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; mobile<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">true</span>, blank:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; email<span style="color: #66cc66;">&#40;</span>email:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">3) Unique by group</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">If you want an attribute on a domain class to be unique, but only grouped by another attribute, you can do it. In the following example, the company name will be unique only for companies from the same client:</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> Company <span style="color: #66cc66;">&#123;</span><br />
&nbsp; Client client<br />
&nbsp; <span style="color: #aaaadd; font-weight: bold;">String</span> name<br />
&nbsp; <span style="color: #aaaadd; font-weight: bold;">String</span> address<br />
&nbsp; <span style="color: #000000; font-weight: bold;">static</span> constraints <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; name<span style="color: #66cc66;">&#40;</span><span style="color: #663399;">size</span>:<span style="color: #cc66cc;">3</span>..50, blank:<span style="color: #000000; font-weight: bold;">false</span>, unique:<span style="color: #ff0000;">'client'</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; address<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp;<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">4) Change database mapping for String attribute</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Grails will map the String attributes on your domain class to varchar(255) by default. If you want a String attribute mapped to text, here’s how you do it:</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<div class="codecolorer-container groovy blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="groovy codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">static</span> mapping <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> <br />
&nbsp; columns<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; attribute_name type:<span style="color: #ff0000;">&quot;text&quot;</span><br />
&nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Stay tuned for more Grails tips!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dyn-solutions.com/2009/06/grails-tips-part-i-%e2%80%93-domain-classes/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

