Copy bindings from db injector to plugin environment
Some basic bindings aren't copied to plugin environment that were defined in SchemaModule, e.g. AllProjectsName. Bug: Issue 3163 Change-Id: I7b07f6658c4b5d0dd997039e85f4373e57c4650f
This commit is contained in:
committed by
David Ostrovsky
parent
6a78963c0c
commit
05cde2836c
@@ -275,7 +275,7 @@ public class Daemon extends SiteProgram {
|
|||||||
cfgInjector = createCfgInjector();
|
cfgInjector = createCfgInjector();
|
||||||
sysInjector = createSysInjector();
|
sysInjector = createSysInjector();
|
||||||
sysInjector.getInstance(PluginGuiceEnvironment.class)
|
sysInjector.getInstance(PluginGuiceEnvironment.class)
|
||||||
.setCfgInjector(cfgInjector);
|
.setDbCfgInjector(dbInjector, cfgInjector);
|
||||||
manager.add(dbInjector, cfgInjector, sysInjector);
|
manager.add(dbInjector, cfgInjector, sysInjector);
|
||||||
|
|
||||||
sshd &= !sshdOff();
|
sshd &= !sshdOff();
|
||||||
|
|||||||
@@ -149,13 +149,15 @@ public class PluginGuiceEnvironment {
|
|||||||
return sysModule;
|
return sysModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCfgInjector(Injector cfgInjector) {
|
public void setDbCfgInjector(Injector dbInjector, Injector cfgInjector) {
|
||||||
|
final Module db = copy(dbInjector);
|
||||||
final Module cm = copy(cfgInjector);
|
final Module cm = copy(cfgInjector);
|
||||||
final Module sm = copy(sysInjector);
|
final Module sm = copy(sysInjector);
|
||||||
sysModule = new AbstractModule() {
|
sysModule = new AbstractModule() {
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
install(copyConfigModule);
|
install(copyConfigModule);
|
||||||
|
install(db);
|
||||||
install(cm);
|
install(cm);
|
||||||
install(sm);
|
install(sm);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ public class WebAppInitializer extends GuiceServletContextListener
|
|||||||
webInjector = createWebInjector();
|
webInjector = createWebInjector();
|
||||||
|
|
||||||
PluginGuiceEnvironment env = sysInjector.getInstance(PluginGuiceEnvironment.class);
|
PluginGuiceEnvironment env = sysInjector.getInstance(PluginGuiceEnvironment.class);
|
||||||
env.setCfgInjector(cfgInjector);
|
env.setDbCfgInjector(dbInjector, cfgInjector);
|
||||||
if (sshInjector != null) {
|
if (sshInjector != null) {
|
||||||
env.setSshInjector(sshInjector);
|
env.setSshInjector(sshInjector);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user