Invoke *PluginListener only after start/reload is fully done
As it is now the bindings on the new plugin are not available when the listener is invoked. Change-Id: I4ea22bc74e7f2c97ccd502dc6388397926ca73e9 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -217,10 +217,6 @@ public class PluginGuiceEnvironment {
|
||||
}
|
||||
|
||||
void onStartPlugin(Plugin plugin) {
|
||||
for (StartPluginListener l : onStart) {
|
||||
l.onStartPlugin(plugin);
|
||||
}
|
||||
|
||||
RequestContext oldContext = enter(plugin);
|
||||
try {
|
||||
attachItem(sysItems, plugin.getSysInjector(), plugin);
|
||||
@@ -237,6 +233,10 @@ public class PluginGuiceEnvironment {
|
||||
} finally {
|
||||
exit(oldContext);
|
||||
}
|
||||
|
||||
for (StartPluginListener l : onStart) {
|
||||
l.onStartPlugin(plugin);
|
||||
}
|
||||
}
|
||||
|
||||
void onStopPlugin(Plugin plugin) {
|
||||
@@ -273,10 +273,6 @@ public class PluginGuiceEnvironment {
|
||||
}
|
||||
|
||||
void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin) {
|
||||
for (ReloadPluginListener l : onReload) {
|
||||
l.onReloadPlugin(oldPlugin, newPlugin);
|
||||
}
|
||||
|
||||
// Index all old registrations by the raw type. These may be replaced
|
||||
// during the reattach calls below. Any that are not replaced will be
|
||||
// removed when the old plugin does its stop routine.
|
||||
@@ -302,6 +298,10 @@ public class PluginGuiceEnvironment {
|
||||
} finally {
|
||||
exit(oldContext);
|
||||
}
|
||||
|
||||
for (ReloadPluginListener l : onReload) {
|
||||
l.onReloadPlugin(oldPlugin, newPlugin);
|
||||
}
|
||||
}
|
||||
|
||||
private void reattachMap(
|
||||
|
||||
Reference in New Issue
Block a user