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) {
|
void onStartPlugin(Plugin plugin) {
|
||||||
for (StartPluginListener l : onStart) {
|
|
||||||
l.onStartPlugin(plugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
RequestContext oldContext = enter(plugin);
|
RequestContext oldContext = enter(plugin);
|
||||||
try {
|
try {
|
||||||
attachItem(sysItems, plugin.getSysInjector(), plugin);
|
attachItem(sysItems, plugin.getSysInjector(), plugin);
|
||||||
@@ -237,6 +233,10 @@ public class PluginGuiceEnvironment {
|
|||||||
} finally {
|
} finally {
|
||||||
exit(oldContext);
|
exit(oldContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (StartPluginListener l : onStart) {
|
||||||
|
l.onStartPlugin(plugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onStopPlugin(Plugin plugin) {
|
void onStopPlugin(Plugin plugin) {
|
||||||
@@ -273,10 +273,6 @@ public class PluginGuiceEnvironment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin) {
|
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
|
// Index all old registrations by the raw type. These may be replaced
|
||||||
// during the reattach calls below. Any that are not replaced will be
|
// during the reattach calls below. Any that are not replaced will be
|
||||||
// removed when the old plugin does its stop routine.
|
// removed when the old plugin does its stop routine.
|
||||||
@@ -302,6 +298,10 @@ public class PluginGuiceEnvironment {
|
|||||||
} finally {
|
} finally {
|
||||||
exit(oldContext);
|
exit(oldContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (ReloadPluginListener l : onReload) {
|
||||||
|
l.onReloadPlugin(oldPlugin, newPlugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reattachMap(
|
private void reattachMap(
|
||||||
|
|||||||
Reference in New Issue
Block a user