Browse files

GRAILS-9509 - improve reloading

There is a problem with stale JVM state that isn't cleared up properly on reload.  Spring Loaded is going to address this but for now the simplest thing for us to do is the change represented here in this commit.

See comments at for more info.
  • Loading branch information...
1 parent 28da49a commit 963cc0b444f8ee2b5873e39effd140fa48f6cc05 @jeffbrown jeffbrown committed Nov 15, 2012
@@ -20,6 +20,7 @@
import org.codehaus.groovy.grails.commons.ClassPropertyFetcher;
import org.codehaus.groovy.grails.compiler.GrailsProjectWatcher;
import org.springframework.beans.CachedIntrospectionResults;
+import java.beans.Introspector;
* Reloading agent plugin for use with the GrailsPluginManager.
@@ -37,11 +38,7 @@ public void reloadEvent(String typename, Class<?> aClass, String encodedTimestam
if (GrailsProjectWatcher.isActive()) {
- try {
- Thread.sleep(2500); // wait for a bit, to reduce chance of any concurrent issues with the timing of the reload reflecting in the JVM
- } catch (InterruptedException e) {
- // ignore
- }
+ Introspector.flushFromCaches(aClass);

0 comments on commit 963cc0b

Please sign in to comment.