I'm curious does anyone know the details on how frameworks like Grails or Play detect changes in the code and automatically trigger a recompilation without rebooting the app server? Is there something specific to Groovy's compiler or its dynamic nature that allows this to easily happen?
For background, I have a custom code generation stage during my build process that I would love to be able to have similar edit-and-refresh capabilities.
Thanks in advance for any pointers, even if I have to sift through code to get the larger picture.
Edit: I should clarify that I'm not looking to build a Grails plugin so much as understand what it takes to do this in any app in a servlet container. i.e., I'm using Groovy but not Grails.
Edit2: It sounds like Play has a specific DEV mode which enables this hot reloading: http://www.playframework.org/documentation/1.1.1/main#lifecycle
I understand that JRebel performs elaborate class versioning via classloaders, but I'm assuming that web frameworks like Grails or Play aren't taking it to that level.