Fix OSGiDOMSchemaService lifecycle 47/97547/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 20 Sep 2021 15:39:21 +0000 (17:39 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 20 Sep 2021 20:35:04 +0000 (22:35 +0200)
commitd700253501f36b049c2cef79e95fca7abd0d85ab
tree02e55ecc4da8213004159903324b24bf47539401
parentf0bf81603764586bc9292d63ace24c6b70c14315
Fix OSGiDOMSchemaService lifecycle

Original refactor specified rather invalid lifecycle for the
OSGiModuleInfoSnapshot dependency -- it is missing the dynamic
binding which was there in one version of the patch set.

Unfortunately the invalid instruction (FieldOption for a method) is not
caught and it is causing a rather weird state, where we end up with a
deactivated service still having listeners firing.

Fix injection lifecycle by having a property DYNAMIC and GREEDY
lifecycle -- which does exactly the right thing, except we need to track
a bit more state to make logging more sane.

JIRA: MDSAL-689
Change-Id: Ia027c45daab528821bee9ae93248d9d7e9ada85d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7484e78692a8a26d02210917b7aec7c28fb317bb)
dom/mdsal-dom-schema-osgi/src/main/java/org/opendaylight/mdsal/dom/schema/osgi/impl/OSGiDOMSchemaService.java