[
https://issues.apache.org/jira/browse/FELIX-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604813#action_12604813
]
Felix Meschberger commented on FELIX-583:
-----------------------------------------
Pedro, thanks for the patch.
After looking into this some deeper, I must say my code is completely crazy ;-)
* It looks for ManagedServiceFactory services
* It looks for existing configuration
* It looks for Metatype Descriptors
But it does _not_ look for ManagedService services ....
So, I must say, this is wrong and I am currently taking a completely different
approach. As described for FELIX-584 [1], I will provide two lists: One with
the ManagedServiceFactory services looking for configuration and one with
ManagedService services (and existing configuration) looking for configuration.
[1]
https://issues.apache.org/jira/browse/FELIX-584?focusedCommentId=12604810#action_12604810
> org.apache.felix.webconsole.internal.compendium.ConfigManager.listConfigurations():
> ManagedServiceFactory instances are listed twice: with pid and factoryPid
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-583
> URL: https://issues.apache.org/jira/browse/FELIX-583
> Project: Felix
> Issue Type: Bug
> Components: Web Console
> Reporter: Dieter Wimberger
> Attachments: webconsole.patch
>
>
> ManagedServiceFactory instances are listed twice, with pid and factoryPid in
> org.apache.felix.webconsole.internal.compendium.ConfigManager.listConfigurations().
> The factoryPid will be added by the loop over the ServiceReference instances
> obtained from the framework for the type (class) ManagedServiceFactory:
> // find all ManagedServiceFactories to get the factoryPIDs
> ServiceReference[] refs =
> this.getBundleContext().getServiceReferences(ManagedServiceFactory.class.getName(),
> null );
> for ( int i = 0; refs != null && i < refs.length; i++ )
>
> Given that it is not removed from the map metaDataPids, it will also be
> added as "pid" by the loop:
> if ( !metaDataPids.isEmpty() )
> {
> for ( Iterator mdpi = metaDataPids.entrySet().iterator(); mdpi.hasNext();
> )
> ....
> SVN revision 662145.
> A fix for this problem is to consistently remove the identifier from
> metaDataPids; this is done in some cases using:
> // remove from the list of known pids
> metaDataPids.remove( pid );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.