[ODLPARENT-242] Service Component Runtime does not conform to R6 spec w.r.t Factory Components Created: 31/Jul/20 Updated: 21/Sep/20 Resolved: 21/Sep/20 |
|
| Status: | Resolved |
| Project: | odlparent |
| Component/s: | Karaf |
| Affects Version/s: | None |
| Fix Version/s: | 8.0.0, 7.0.6, 6.0.12 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| External issue ID: | https://issues.apache.org/jira/browse/FELIX-6315 |
| Description |
|
Felix SCR 4.1.20 (and before), as bundled with karaf-4.2.9, fails to enforce correct lifecycle on factory-defined component configurations. In particular, SCR will deactivate such a component configuration when its services become unused, such as going through a getService/ungetService cycle. This mirrors the lifecycle of a Delayed Component, not a Factory component – see sections 112.5.4 and 112.5.5 of OSGi Compendium spec. This issue tracks two things:
The mitigation comes in form of https://issues.apache.org/jira/browse/FELIX-3039, i.e. preventing Felix from deactivating unused delayed components. |
| Comments |
| Comment by Robert Varga [ 31/Jul/20 ] |
nite@nitebug : ~/odl/controller/karaf/controller-test-karaf-2.0.4-SNAPSHOT on master $ cat etc/org.apache.felix.scr.ScrService.cfg # Workaround for FELIX-6315 ds.delayed.keepInstances = true seems to hide the problem well enough. Although it may be overreaching, adding properly-namespaced attributes to component definitions, so as to localize this to specific components, seems less than convenient. |
| Comment by Robert Varga [ 16/Sep/20 ] |
|
Upstream has accepted the fix, hence it will appear in scr-2.1.24. |