felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-2644) cannot disable plugin
Date Mon, 25 Oct 2010 07:43:19 GMT

    [ https://issues.apache.org/jira/browse/FELIX-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924481#action_12924481
] 

Felix Meschberger commented on FELIX-2644:
------------------------------------------

Patch basically looks good.

Some comments:

  * Can you please commit the "$NON-NLS-1$" changes in a separate commit ? (just to keep the
history clean ;-) )
  * Instead of making the OsgiManager.enabledPlugins field package private I suggest:
            - to add an OsgiManager.isEnabled(String classNameOrLabel) returning whether the
plugin is enabled
  * How about making InternalPlugin.isEnabled() a method of the Plugin class ? This makes
all plugins eligible for disablement and allows us to not do stuff like "if plugin instanceof
InternalPlugin"
  * ConfigurationListener2: Currently only built-in plugins support enablement. By movind
the isEnabled method to the Plugin class, this class could be extended to go to the registered
plugins to extend the list of plugins, which may be enabled/disabled, to the full set of installed
plugins.

> cannot disable plugin
> ---------------------
>
>                 Key: FELIX-2644
>                 URL: https://issues.apache.org/jira/browse/FELIX-2644
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-3.1.2
>            Reporter: Valentin Valchev
>         Attachments: internal-plugin-loader.patch
>
>
> Something went terribly wrong! I cannot disable a plugin from the configuration.
> The reason for this is that the plugins are initialized during startup. In the constructor,
the Web Console will lookup the configuration and see if plugin is disable. If so, it will
be ignored, otherwise the plugin will be instantiated and ready to use.
> However, configuration delivery is asynchronous, so you don't know when the configuration
dictionary is delivered and in my case, it is 'updated' a little bit after the initialization.
So initially, when the web console is initialized, it has 'null' - default configuration and
all plugins are enabled. Then later on, after updating the configuration I disable as example
the 'shell' plugin.
> Unfortunately, the web console will not check if the plugin is disabled, when the browser
is opened and the 'shell' plugin remains visible.
> Putting the plugin initialization in the constructor, means, that there is no way to
actually disable a plugin and all internal plugin will be instantiate and visible by default,
Even if they are not needed, there is no browser request for them or disabled by the configuration.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message