Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[semantics] Specified service for component description #989

Conversation

cweitkamp
Copy link
Contributor

@cweitkamp cweitkamp commented Aug 21, 2019

  • Specified service for component description
  • Implement ItemRegistryChangeListener interface instead of RegistryChangeListener<Item>

Signed-off-by: Christoph Weitkamp github@christophweitkamp.de

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
@cweitkamp cweitkamp added the bug An unexpected problem or unintended behavior of the Core label Aug 21, 2019
@kaikreuzer
Copy link
Member

Thanks for this fix!

Could you briefly explain why this resolves the circular reference?
And registering the service as a MetaDataProvider, does it mean that this was lost when removing the xmls (and thus the whole service wasn't working?)

@cweitkamp
Copy link
Contributor Author

I have to admit, that I am not sure if it will resolve the circular reference. I tried to identify it but I could not find it. If it really exists the construction injection changes will reveal it. Maybe there is another consumer involved which is not part of OHC. I will ask @digitaldan about it and remove the magic words from my OP.

MetadataProvider (SemanticsMetadataProvider) -->
(1..1) ItemRegistry (ItemRegistryImpl) -->
(1..1) MetadataRegistry (MetadataRegistryImpl) -->
(optional, dynamic) ManagedMetadataProvider (ManagedMetadataProviderImpl) -->
(1..1) StorageService ...

What caught my attention was this message. SCR created a service for the RegistryChangeListener - which is not supposed to be registered as a service - I guess. The specific declaration now takes care of that.

{org.eclipse.smarthome.core.items.MetadataProvider, org.eclipse.smarthome.core.common.registry.RegistryChangeListener}={service.id=256, service.bundleid=186, service.scope=bundle, component.name=org.eclipse.smarthome.core.semantics.internal.SemanticsMetadataProvider, component.id=134}

I am afraid I cannot tell you if something got lost back then. The initial contribution (eclipse-archived/smarthome#6288) already used DS annotations.

Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, sounds all reasonable!

@kaikreuzer kaikreuzer merged commit 5c5c9ae into openhab:master Aug 24, 2019
@cweitkamp cweitkamp deleted the bugfix-890-circular-reference-semanticsmetadataprovider branch August 24, 2019 21:50
@cweitkamp cweitkamp added this to the 2.5 milestone Aug 25, 2019
@cweitkamp cweitkamp removed the bug An unexpected problem or unintended behavior of the Core label Dec 3, 2019
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
GitOrigin-RevId: 5c5c9ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants