« Return to Thread: Groovy and Hotswap

Re: Groovy and Hotswap

by bumzee :: Rate this Message:

Reply to Author | View in Thread

Yes, I'm aware of that.  Via most IDEs,  one can modify java classes and reload the changes without restarting the entire application.  This simply does not work with groovy based classes.  I'm using Resin, but I contacted them and they said it's a groovy problem.  So I tried it in Tomcat and they were right, it doesn't work there either.  

Maybe it's not supposed to work, but it's seems a major inconvenience if this is true.

I have some groovy classes in my application, All works well if compile and deploy the application.
My problem is isolated to the development process.  If I make a change to any groovy based class, bean or otherwise, no matter what the change, and attempt to reload the classes via hotswap, the changes aren't reloaded.  In Resin, the entire app restarts.  In Tomcat, the app doesn't restart and the changes are not detected.

I have the groovy all jar in my classpath and that's it.  I'm using intellij, but it is no doubt using groovyc to compile the groovy classes.    But when not in the IDE and using Resin, which supports auto reloading of modified classes,  I have the same problem with groovy classes.  It can't reload them without restarting the application.

Basically, the hotswap feature supported in all java IDEs doesn't work on groovy classes. Or so it seems.  Just want to know if there is some kind of work around and/or if this is a issue being addressed in future versions of groovy.


Posted here, and at least one other users seems to be aware of the problem.
http://www.nabble.com/Resin-And-Groovy-td19976910.html





glaforge wrote:
How are you integrating Groovy in your application?
It just doesnt reload automagically when Groovy source files have changed.

On Wed, Oct 15, 2008 at 4:09 PM, bumzee <david.smith@everbank.com> wrote:
>
> I've added Groovy to an existing web project being developed in Java 1.5,
> IntelliJ 7.04 and Resin 3.1.5.  No spring, no grails and groovy is not being
> used as groovlets or GSPs.  I have some groovy beans and groovy controller
> classes.  Anyway....I can't make changes to the groovy classes without
> restarting my web application.  The java classes can't changed and reloaded
> with the normal hotswap restrictions, but not the groovy classes.
>
> The problem seems to be groovyc.
> Is it simply not possible to have groovy work with hotswap?  I guess it
> doesn't necessarily need to work with hotswap,  I just don't want to have to
> restart after changing a groovy classes.
> --
> View this message in context: http://www.nabble.com/Groovy-and-Hotswap-tp19994293p19994293.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



--
Guillaume Laforge
Groovy Project Manager
G2One, Inc. Vice-President Technology
http://www.g2one.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 « Return to Thread: Groovy and Hotswap