Fix OSGiDOMSchemaService lifecycle 46/97546/4
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:03:55 +0000 (22:03 +0200)
commit7484e78692a8a26d02210917b7aec7c28fb317bb
treef1b14ed9325fbb2ff8fcd942145e75d105da7327
parentb8172337ffd25c5e2a1cb090f43b3c70d7f6611d
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>
dom/mdsal-dom-schema-osgi/src/main/java/org/opendaylight/mdsal/dom/schema/osgi/impl/OSGiDOMSchemaService.java