« Return to Thread: Groovy and Hotswap

Re: Groovy and Hotswap

by bumzee :: Rate this Message:

Reply to Author | View in Thread

I noted the GSP and Groovlet stuff because that works ok.

I'm not doing anything special here and I know you're aware of the hotswap feature in the jvm.

Crack open your fav IDE, start a web project, add the groovy jars. Create some groovy class, modify it and recompile without restarting and see if you change has been loaded . It won't be.  Do the same thing with a java class and it will.

JavaRebel doesn't work with groovy either.
http://www.zeroturnaround.com

HotSwap is the correct term.  There's a JSR for it and everything.  All modern IDEs support it.

Again, maybe groovy isn't supposed to work with it, I'm just wondering how others are working around this.

Regardless of what it's called, how can I reload a modified groovy class using any IDE ?  If I can do it with a java class, shouldn't I be able to do it w/groovy.

I know this is an issue because grails use to reload the entire application when there was a change to a groovy class.  Under certain circumstances it still does.


http://java.sun.com/j2se/1.4.2/docs/guide/jpda/enhancements.html


Jochen Theodorou wrote:
bumzee schrieb:
> 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.

checked ;)

> 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.

can't changed? you mean the java classes can be changed I guess. Also I
am irritated by the term hotwap here... VM based this means that you
replace a class with a new version. Does it mean the same here? And what
are the restrictions?

> The problem seems to be groovyc.  

because?

> 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.  

we have other things for this, but first let us look at the questions
above... and I need to know the following... you do not use groovy ource
files, you use precompiled classes, right?

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

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

    http://xircles.codehaus.org/manage_email

 « Return to Thread: Groovy and Hotswap