API request: add a hook prior to classloader detect changes

Bug #520887 reported by bran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
play framework
Status tracked in 1.0
1.0
Fix Released
Undecided
Unassigned
1.1
Fix Committed
Undecided
Unassigned

Bug Description

For plugins to implements some java source code engineering, I'd ask for some extra API for the PLayPLugin. Something in the line of:

Would be nice to have this in the next 1.0 series.

public abstract class PlayPlugin2 extends PlayPlugin {
    public abstract void preDetectChanges();
}

And then in the Play.java, modify the detectChanges() to :

   public static synchronized void detectChanges() {
        if (mode == Mode.PROD) {
            return;
        }

       try {
          for (PlayPlugin plugin : plugins) {
           if (plugin instanceof PlayPlugin2) {
            ((PlayPlugin2)plugin).preDetectChanges();
           }
          }
           classloader.detectChanges();
 //.....
        } catch (PlayException e) {
           throw e;
        } catch (Exception e) {
            // We have to do a clean refresh
            start();
        }
    }

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.