You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Valentin Valchev (JIRA)" <ji...@apache.org> on 2010/10/20 08:33:22 UTC

[jira] Updated: (FELIX-2644) cannot disable plugin

     [ https://issues.apache.org/jira/browse/FELIX-2644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Valentin Valchev updated FELIX-2644:
------------------------------------

    Attachment: internal-plugin-loader.patch

Attached quick and dirty patch for fixing the problem

Now the internal plugins are created by class-name, so the plugins are instantiated when they are requested.

This theoretically should decrease the startup time of the bundle.

Unfortunately there is a small problem with the metatype - I need to show the titles, but since I don't have the plugin instances I don't know the titles. So I assume, that the title is a resource key which is made as "<label>.pluginTitle", which of course is not true ;) And if the title is missing, then the label is used.



> 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.