Fixing add to context

This commit is contained in:
Luca Frosini 2020-10-01 15:38:48 +02:00
parent 2e04364edc
commit cadd9ec02d
1 changed files with 1 additions and 3 deletions

View File

@ -108,8 +108,6 @@ class RestISPublisher extends ISPublisher {
@Override
public void publishPlugins(Map<String, Class<? extends Plugin>> availablePlugins) throws Exception {
UUID contextUUID = resourceRegistryClient.getCurrentContext().getHeader().getUUID();
for(String pluginName : availablePlugins.keySet()) {
Plugin plugin = PluginManager.getPlugin(pluginName);
@ -124,7 +122,7 @@ class RestISPublisher extends ISPublisher {
} catch (AvailableInAnotherContextException e) {
runningPlugin = new RunningPluginImpl();
runningPlugin.setHeader(new HeaderImpl(pluginUUID));
resourceRegistryPublisher.addToContext(contextUUID, runningPlugin);
resourceRegistryPublisher.addToCurrentContext(runningPlugin);
} catch (ResourceRegistryException e) {
throw e;
}