diff options
Diffstat (limited to 'src/main/java/com/gitblit/servlet/GitblitContext.java')
-rw-r--r-- | src/main/java/com/gitblit/servlet/GitblitContext.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/servlet/GitblitContext.java b/src/main/java/com/gitblit/servlet/GitblitContext.java index 50f22d5a..d5b4092c 100644 --- a/src/main/java/com/gitblit/servlet/GitblitContext.java +++ b/src/main/java/com/gitblit/servlet/GitblitContext.java @@ -175,6 +175,9 @@ public class GitblitContext extends DaggerContext { runtime.start(); managers.add(runtime); + // create the plugin manager instance but do not start it + loadManager(injector, IPluginManager.class); + // start all other managers startManager(injector, INotificationManager.class); startManager(injector, IUserManager.class); @@ -215,9 +218,14 @@ public class GitblitContext extends DaggerContext { return null; } + protected <X extends IManager> X loadManager(ObjectGraph injector, Class<X> clazz) { + X x = injector.get(clazz); + return x; + } + protected <X extends IManager> X startManager(ObjectGraph injector, Class<X> clazz) { + X x = loadManager(injector, clazz); logManager(clazz); - X x = injector.get(clazz); x.start(); managers.add(x); return x; |