Home > Java > Changing code in Grails services

Changing code in Grails services

by paul on September 5, 2007

I’ve been using Grails for the last couple of months, and I’m loving it. While looking up some reference information, I stumbled across this gem.

Its always been frustrating when updating services that the server needed to be restarted. Well, this problem has been caused because I’ve been specifying the type of my services instead of using the def keyword. Now that I’m not specifying the type, no more server restarts!

{ 1 comment… read it below or add one }

Ho Minh Chuc February 26, 2009 at 5:12 pm

It’s “def” keyword to make “Dependency Injection” aspect in Grails Service. If you explicitly initialize Grails Service, e.g. new XxxService(), it will make any transactions fail to work.

Leave a Comment

Previous post:

Next post: