Issue with OSGi Config Admin, DS and component factory [message #1821647] |
Tue, 18 February 2020 07:53 |
Mike Rumpf Messages: 5 Registered: February 2020 |
Junior Member |
|
|
Hi,
I encountered a problem with a factory component, Equinox CM ( 1.4.200.v20191001-1333) and a custom bundle with the following service component:
@Component(name = "ConfiguredComponent", service = {}, configurationPid = { "$", "mybase" },
configurationPolicy = ConfigurationPolicy.REQUIRE)
public class ConfiguredComponent {}
If I provide 2 factory configurations via the ConfigAdmin and a configuration with the name "mybase" two instances of ConfiguredComponent are created. That works fine just as expected.
However if I stop and start the bundle containing the ConfiguredComponent, both instances are not re-created though all respective configurations are still active.
I found out that having "mybase" as additional configurationPid is responsible for the unexpected behaviour. If I remove the configurationPid definition from the component header restarting the bundle will also restart the two component instances as I would have expected.
Is this a cm bug with handling multiple configurations? Or is a factory component only allowed to have one configuration which will control the instance creation?
Thank in advance,
Mike
PS: If needed I could provide a complete example demonstrating the issue.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03284 seconds