A few weeks since the last post. A lazy start of the new year
One of the significant things that happened recently was a hosting change - I moved my blogs to rootnode.net ("shell accounts from hell" as they say themselves). Beside PHP hosting there is a possibility to host Java apps so maybe some Grails project will come to life soon Because of the transition period some of you probably got some mixed up feeds from my private and technical blog - sorry for that.
A new issue of JavaExpress magazine is now available for download. You can download it at http://www.javaexpress.pl/. English version is not available yet but it will be soon.
In previous posts we've learned how to create Session Beans (both Statless and Stateful). In this post I would like to show how to use lifecycle callbacks.
Unit testing is great. As we learn it it's excellent. As we work on greenfield projects it's beautiful and sweet. The real problems start on the real projects.
If you need the latest possible version of Grails (not release) you can download a fresh build from Hudson or build it yourself. The second options is fairly easy.
In the mean time check that you've JDK 1.5+ and Ant installed.
After the cloning is done go to grails/grails/ folder and run 'ant jar'. This will build the release.
Set env variable GRAILS_HOME to your clone folder.
In your Grails project (not the Grails sources) when you want to use your fresh build, go to application.properties and change app.grails.version to a new version. For example: app.grails.version = 1.2-SNAPSHOT
The upcoming release 1.2 of Grails will have an interesting feature: global configuration of GORM settings. You can have a first look here http://jira.codehaus.org/browse/GRAILS-5287.
Not much time passed sinced Google Wave has been introduced to wider audience and there already is a Google Wave Grails plugin. David Trattnig prepared a great plugin that lets you embed waves in your app or do even more amazing thing - write Wave robots. See an example of a wave robot. If you add a sample robot to your wave you can ask it to execute a groovy code and return results
In the previous post we've set up our environment to work with EJB3. It's based on Eclipse, JBoss Tools and JBoss Application Server. However you can follow the tutorial with the environment set up of your choice. Another popular one would be Netbeans. You can download it as a bundle with Glassfish server. If you decide to switch it please remember that some things presented here might be environment specific and may work differently (but most of them shouldn't).
In this post we will say a little bit more about Session Beans and we will try to cover the differences between Stateless and Stateful Session Beans.