]> source.dussan.org Git - gitblit.git/commitdiff
Start plugin manager last to allow plugins deterministic access to the other managers
authorJames Moger <james.moger@gitblit.com>
Mon, 14 Apr 2014 19:11:24 +0000 (15:11 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 14 Apr 2014 19:11:24 +0000 (15:11 -0400)
src/main/java/com/gitblit/servlet/GitblitContext.java

index 553651da21f7967f0260f7f9e9623214b06aa5f0..b865750b003a44d4db07ac803ca7f873cdfe75a4 100644 (file)
@@ -177,7 +177,6 @@ public class GitblitContext extends DaggerContext {
                managers.add(runtime);
 
                // start all other managers
-               startManager(injector, IPluginManager.class);
                startManager(injector, INotificationManager.class);
                startManager(injector, IUserManager.class);
                startManager(injector, IAuthenticationManager.class);
@@ -187,6 +186,10 @@ public class GitblitContext extends DaggerContext {
                startManager(injector, IFederationManager.class);
                startManager(injector, IGitblit.class);
 
+               // start the plugin manager last so that plugins can depend on
+               // deterministic access to all other managers in their start() methods
+               startManager(injector, IPluginManager.class);
+
                logger.info("");
                logger.info("All managers started.");
                logger.info("");