From 289917bb90ee30fb357a3646ba0d40ceacf7e5ed Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 14 Apr 2014 15:11:24 -0400 Subject: [PATCH] Start plugin manager last to allow plugins deterministic access to the other managers --- src/main/java/com/gitblit/servlet/GitblitContext.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/servlet/GitblitContext.java b/src/main/java/com/gitblit/servlet/GitblitContext.java index 553651da..b865750b 100644 --- a/src/main/java/com/gitblit/servlet/GitblitContext.java +++ b/src/main/java/com/gitblit/servlet/GitblitContext.java @@ -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(""); -- 2.39.5