|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
Groovy and HotswapI'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 be 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. |
|
|
Re: Groovy and HotswapHow 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@...> 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 |
|
|
Re: Groovy and Hotswapbumzee 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 |
|
|
Re: Groovy and HotswapYes, 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
|
|
|
Re: Groovy and HotswapI 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
|
|
|
Re: Groovy and Hotswapbumzee schrieb:
> 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 worth 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. so with hotswaping you mean replacing a class at rutime in the VM wihtout creating a new class... ok, once that is out, why did they say it won't work for Groovy? Groovy creates classes too. I don't know how that hotwaping is working and what restrictions it has, so I have no idea what the problem could be. Afaik something needs to recognize that we have a nes class file and that needs to be loaded in the VM that is running in debugging mode. Since we produce oridinary class files there are only two things that can be wrong... Either the class file version is too low or the files are not recognized as changed. But I can only guess. I have no documentation about hotswapping. [...] > 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. that might be, but does it place the class files where you need them? Does intellij even consider that there is something from Groovy for hotswapping? > 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. and how do you compile the classes there? You use groovyc? > 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. we can try to fix the issue, but we need more data on this bye blackdrag PS: please don't be impatient... just because your mail does not show up right away it does not mean you are forgotten. The mail server is sometimes a bit slow, because it is sometimes under spam attack. -- 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 |
|
|
Re: Groovy and HotswapIf it's of any help, we at ZeroTurnaround investigated why Groovy doesn't work with JavaRebel and it was connected with callsite caching (http://www.zeroturnaround.com/forum/topic.php?id=80). You may be hitting the same issue with JVM HotSwap as well. We would gladly work with someone to get Groovy classes reloading...
Jevgeni Kabanov
|
|
|
Re: Groovy and HotswapEugeny, I probably the right person to help here.
Что с удовольствием и сделаю (it will be my pleasure) On Thu, Oct 16, 2008 at 1:01 PM, ekabanov <ekabanov@...> wrote:
|
|
|
Re: Groovy and Hotswapekabanov schrieb:
> If it's of any help, we at ZeroTurnaround investigated why Groovy doesn't > work with JavaRebel and it was connected with callsite caching > (http://www.zeroturnaround.com/forum/topic.php?id=80). You may be hitting > the same issue with JVM HotSwap as well. We would gladly work with someone > to get Groovy classes reloading... but we where told it does not work with 1.5.x and there is no call site caching. Or is the reason the two uninitialized fields? 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 |
|
|
Re: Groovy and HotswapAlex Tkachman schrieb:
> Eugeny, I probably the right person to help here. > Что с удовольствием и сделаю (it will be my pleasure) would be great if you could investigate (or ask) what the problem with our byecode is. 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 |
|
|
Re: Groovy and Hotswapstacktrace shows that call sites are there :)
On Thu, Oct 16, 2008 at 2:58 PM, Jochen Theodorou <blackdrag@...> wrote: ekabanov schrieb: |
|
|
Re: Groovy and HotswapI think the mails in the current chain have only mentioned java version as 1.5 and not groovy version. May be it is "Java 1.5 + groovy 1.6.x + call site caching" issue :-)
On Thu, Oct 16, 2008 at 4:28 PM, Jochen Theodorou <blackdrag@...> wrote: ekabanov schrieb: |
|
|
Re: Groovy and HotswapWe we saw with Eugene so far is nort problem with bytecode per se. When class is reloaded it still be the same Class, so we use the same call site cache so have conflict between indexes in new bytecode and already used old one. I adviced Eugene how to reset call site cache when he does reload class. Let see if it will help
On Thu, Oct 16, 2008 at 4:06 PM, Jochen Theodorou <blackdrag@...> wrote: Alex Tkachman schrieb: |
| Free embeddable forum powered by Nabble | Forum Help |