Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC0B1D86B for ; Fri, 24 May 2013 14:06:26 +0000 (UTC) Received: (qmail 16755 invoked by uid 500); 24 May 2013 14:06:26 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 16425 invoked by uid 500); 24 May 2013 14:06:26 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 15766 invoked by uid 99); 24 May 2013 14:06:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 May 2013 14:06:22 +0000 Date: Fri, 24 May 2013 14:06:22 +0000 (UTC) From: "Carsten Ziegeler (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-4074) Plugin class name changed for config manager plugin, might be disabled on update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666326#comment-13666326 ] Carsten Ziegeler commented on FELIX-4074: ----------------------------------------- Suggest patch: the patch simply checks whether the old class was in the list of enabled plugins and replaces it with the new class. Index: src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java =================================================================== --- src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java (revision 1486055) +++ src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java (working copy) @@ -171,6 +171,9 @@ */ static final String DEFAULT_MANAGER_ROOT = "/system/console"; //$NON-NLS-1$ + private static final String OLD_CONFIG_MANAGER_CLASS = "org.apache.felix.webconsole.internal.compendium.ConfigManager"; //$NON-NLS-1$ + private static final String NEW_CONFIG_MANAGER_CLASS = "org.apache.felix.webconsole.internal.configuration.ConfigManager"; //$NON-NLS-1$ + static final String[] PLUGIN_CLASSES = { "org.apache.felix.webconsole.internal.configuration.ConfigurationAdminConfigurationPrinter", //$NON-NLS-1$ "org.apache.felix.webconsole.internal.compendium.PreferencesConfigurationPrinter", //$NON-NLS-1$ @@ -182,7 +185,7 @@ "org.apache.felix.webconsole.internal.misc.ThreadPrinter", }; //$NON-NLS-1$ static final String[] PLUGIN_MAP = { - "org.apache.felix.webconsole.internal.configuration.ConfigManager", "configMgr", //$NON-NLS-1$ //$NON-NLS-2$ + NEW_CONFIG_MANAGER_CLASS, "configMgr", //$NON-NLS-1$ //$NON-NLS-2$ "org.apache.felix.webconsole.internal.compendium.LogServlet", "logs", //$NON-NLS-1$ //$NON-NLS-2$ "org.apache.felix.webconsole.internal.core.BundlesServlet", "bundles", //$NON-NLS-1$ //$NON-NLS-2$ "org.apache.felix.webconsole.internal.core.ServicesServlet", "services", //$NON-NLS-1$ //$NON-NLS-2$ @@ -963,6 +966,14 @@ // get enabled plugins String[] plugins = ConfigurationUtil.getStringArrayProperty(config, PROP_ENABLED_PLUGINS); enabledPlugins = null == plugins ? null : new HashSet(Arrays.asList(plugins)); + // check for moved config manager class + if ( enabledPlugins != null ) + { + if ( enabledPlugins.remove(OLD_CONFIG_MANAGER_CLASS) ) + { + enabledPlugins.add(NEW_CONFIG_MANAGER_CLASS); + } + } initInternalPlugins(); // might update HTTP service registration > Plugin class name changed for config manager plugin, might be disabled on update > -------------------------------------------------------------------------------- > > Key: FELIX-4074 > URL: https://issues.apache.org/jira/browse/FELIX-4074 > Project: Felix > Issue Type: Bug > Components: Web Console > Affects Versions: webconsole-4.0.0 > Reporter: Carsten Ziegeler > Fix For: webconsole-4.2.0 > > > The class of the config manager plugin changed from org.apache.felix.webconsole.internal.compendium.ConfigManager > to > org.apache.felix.webconsole.internal.configuration.ConfigManager > while this is an implementation detail, it is unfortunately also used to disable plugins through a configuration for the OsgiManager. > If now a configuration is available for the OSGiManager which lists enabled plugins including the old class name, updating the web console will lead to disabling the config manager plugin > Easiest fix would be to revert the name change -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira