From 75f06ee52936f31f968a112c0db405f77f342160 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:05:32 +0000 Subject: [PATCH 1/6] Initial plan From 4ee6a3e73d9d4e7fa45dfb8588aa7d352cde0905 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:18:16 +0000 Subject: [PATCH 2/6] Document satisfying condition as OSGi R8 spec-compliant feature Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com> --- scr/README.md | 49 ++++++++++++++++++- .../scr/impl/metadata/ReferenceMetadata.java | 6 ++- .../apache/felix/scr/impl/xml/XmlHandler.java | 12 +++-- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/scr/README.md b/scr/README.md index a350e34d91..138daf3125 100644 --- a/scr/README.md +++ b/scr/README.md @@ -4,7 +4,7 @@ The Apache Felix Service Component Runtime described by the [OSGi Declarative Se The Java annotations defined by the specification make implementing components easy and reduce the amount of code that needs be written. These annotations are processed at build time and translated into XML descriptor files which in turn are listed in the `Service-Component` header of the declaring bundle. But the good news is, you usually don't have to worry about this XML, however in case things don't work as expected , it's good to know how these things work. -The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. +The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. This implementation also includes support for preliminary OSGi R8 features including the Satisfying Condition specification. ## Example Usage @@ -112,6 +112,53 @@ public Comparator(@Reference LogService logService) } ``` +## Satisfying Condition (OSGi R8) + +Apache Felix SCR implements the Satisfying Condition feature as specified in the OSGi R8 Declarative Services specification. This feature allows components to be activated only when specific runtime conditions are met. + +### How It Works + +When the OSGi framework provides a `true` condition service (registered by the system bundle with the property `osgi.condition.id=true`), Apache Felix SCR automatically adds an implicit satisfying condition reference to all components. This implicit reference: + +- Has the name `osgi.ds.satisfying.condition` +- References the `org.osgi.service.condition.Condition` service +- Uses a dynamic policy +- Defaults to target `(osgi.condition.id=true)` + +### Customizing the Satisfying Condition + +Components can customize the satisfying condition target by setting the `osgi.ds.satisfying.condition.target` property: + +```xml + + + + +``` + +Alternatively, components can explicitly declare the satisfying condition reference to have full control over its configuration: + +```xml + + + + +``` + +### Use Cases + +Satisfying conditions are useful for: +- Delaying component activation until the system is fully initialized +- Implementing conditional component activation based on runtime state +- Managing component lifecycle based on external conditions + +For more details, see: +- [OSGi Issue #720](https://github.com/osgi/osgi/issues/720) +- [OSGi PR #875](https://github.com/osgi/osgi/pull/875) + ## Apache Maven Support Both, the [maven-bundle-plugin](http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html) as well as the [bnd-maven-plugin](https://github.com/bndtools/bnd/tree/master/maven) supports processing the annotations and creating the XML component descriptors. diff --git a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java index dfaf73d042..985c8ec3d0 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/metadata/ReferenceMetadata.java @@ -101,7 +101,11 @@ public enum ReferenceScope {bundle, prototype, prototype_required} public static final String CONDITION_TRUE_FILTER = "(osgi.condition.id=true)"; - // TODO this constant will be defined in the R8 Declarative Services spec + /** + * The reference name for the implicit satisfying condition as defined in the + * OSGi R8 Declarative Services specification (see https://github.com/osgi/osgi/pull/875). + * This reference is automatically added to components when a true condition service is available. + */ public static final String REFERENCE_NAME_SATISFYING_CONDITION = "osgi.ds.satisfying.condition"; // Name for the reference (required) diff --git a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java index 00a0546f37..a7588f6d68 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java @@ -483,6 +483,11 @@ else if ( localName.equals( XmlConstants.EL_FACTORY_PROPERTY ) && m_pendingFacto m_pendingFactoryProperty = null; } } + // Add implicit satisfying condition reference as per OSGi R8 Declarative Services specification + // (see https://github.com/osgi/osgi/pull/875 and https://github.com/osgi/osgi/issues/720). + // When a true condition service is available from the framework, an implicit satisfying condition + // reference is automatically added to all components unless they already explicitly declare one. + // This allows components to be activated only when certain runtime conditions are met. if (m_trueCondition != null && localName.equals(XmlConstants.EL_COMPONENT)) { boolean missingSatisfyingConditionRef = true; @@ -504,9 +509,10 @@ else if ( localName.equals( XmlConstants.EL_FACTORY_PROPERTY ) && m_pendingFacto trueReference.setInterface(ReferenceMetadata.CONDITION_SERVICE_CLASS); trueReference.setPolicy(ReferenceMetadata.POLICY_DYNAMIC); m_currentComponent.addDependency(trueReference); - // Here we add the target property for the implicit satisfying condition - // first such that any properties that are specified explicitly can - // be used to override this implicit property + // Add the target property for the implicit satisfying condition. + // This is added first so that any explicitly specified properties can + // override this implicit property, allowing components to specify custom + // condition targets via the osgi.ds.satisfying.condition.target property. PropertyMetadata prop = new PropertyMetadata(true); prop.setName( ReferenceMetadata.REFERENCE_NAME_SATISFYING_CONDITION + ".target"); From dc3446903f2965e650f06d235fec52b33d9e7dc0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:19:06 +0000 Subject: [PATCH 3/6] Update changelog for satisfying condition documentation Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com> --- scr/changelog.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scr/changelog.txt b/scr/changelog.txt index 73db2e4606..a4e0b7cdcd 100644 --- a/scr/changelog.txt +++ b/scr/changelog.txt @@ -1,3 +1,13 @@ +Changes in 2.2.15 +----------------- +** Improvement + * Document Satisfying Condition feature as OSGi R8 specification-compliant + - The existing satisfying condition implementation is now documented as compliant + with the preliminary OSGi R8 Declarative Services specification changes + - See https://github.com/osgi/osgi/pull/875 and https://github.com/osgi/osgi/issues/720 + - Added comprehensive documentation in README.md + - Updated code comments to reflect specification compliance + Changes in 2.2.14 ----------------- ** PRs From 1bf71464633b3b3a9757be2ff9d0da7722a1104f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 08:20:47 +0000 Subject: [PATCH 4/6] Address code review feedback - clarify preliminary spec status Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com> --- scr/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scr/README.md b/scr/README.md index 138daf3125..3b6482ad0a 100644 --- a/scr/README.md +++ b/scr/README.md @@ -4,7 +4,7 @@ The Apache Felix Service Component Runtime described by the [OSGi Declarative Se The Java annotations defined by the specification make implementing components easy and reduce the amount of code that needs be written. These annotations are processed at build time and translated into XML descriptor files which in turn are listed in the `Service-Component` header of the declaring bundle. But the good news is, you usually don't have to worry about this XML, however in case things don't work as expected , it's good to know how these things work. -The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. This implementation also includes support for preliminary OSGi R8 features including the Satisfying Condition specification. +The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. This implementation also includes support for OSGi R8 features such as the Satisfying Condition specification (preliminary). ## Example Usage @@ -114,7 +114,9 @@ public Comparator(@Reference LogService logService) ## Satisfying Condition (OSGi R8) -Apache Felix SCR implements the Satisfying Condition feature as specified in the OSGi R8 Declarative Services specification. This feature allows components to be activated only when specific runtime conditions are met. +Apache Felix SCR implements the Satisfying Condition feature as specified in the preliminary OSGi R8 Declarative Services specification. This feature allows components to be activated only when specific runtime conditions are met. + +**Note:** This feature is based on the preliminary OSGi R8 specification changes ([PR #875](https://github.com/osgi/osgi/pull/875), [Issue #720](https://github.com/osgi/osgi/issues/720)) and may be subject to changes before the final R8 specification is released. ### How It Works From dbc2e5127aa15714b08e98b19a3553f3597b0360 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 09:44:28 +0000 Subject: [PATCH 5/6] Implement retention-policy element from OSGi R8 specification Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com> --- scr/README.md | 66 +++++++++++++++++++ scr/changelog.txt | 6 ++ .../felix/scr/impl/xml/XmlConstants.java | 5 ++ .../apache/felix/scr/impl/xml/XmlHandler.java | 48 ++++++++++++++ .../felix/scr/impl/xml/XmlHandlerTest.java | 26 ++++++++ .../resources/retention-policy-discard.xml | 24 +++++++ .../resources/retention-policy-retain.xml | 24 +++++++ 7 files changed, 199 insertions(+) create mode 100644 scr/src/test/resources/retention-policy-discard.xml create mode 100644 scr/src/test/resources/retention-policy-retain.xml diff --git a/scr/README.md b/scr/README.md index 3b6482ad0a..ebea91fe24 100644 --- a/scr/README.md +++ b/scr/README.md @@ -161,6 +161,72 @@ For more details, see: - [OSGi Issue #720](https://github.com/osgi/osgi/issues/720) - [OSGi PR #875](https://github.com/osgi/osgi/pull/875) +## Retention Policy (OSGi R8) + +Apache Felix SCR implements the Retention Policy feature as specified in the preliminary OSGi R8 Declarative Services specification. This feature allows control over whether component instances are retained when their use count drops to zero. + +**Note:** This feature is based on the preliminary OSGi R8 specification changes ([PR #875](https://github.com/osgi/osgi/pull/875), [Issue #720](https://github.com/osgi/osgi/issues/720)) and may be subject to changes before the final R8 specification is released. + +### Problem Statement + +Components that are expensive to activate/deactivate or that maintain caches have limited control over their lifecycle when the service use count drops to zero. They either: +- Stay permanently active with `immediate="true"` +- Get deactivated on every idle period with `immediate="false"` (default for delayed components) + +The retention policy feature solves this by allowing components to specify whether they should be retained even when not in use. + +### Using Retention Policy + +The `retention-policy` element can have two values: + +- **`retain`**: Keep the component instance active even when use count is zero. The component will not be deactivated until explicitly disabled or when dependencies become unsatisfied. +- **`discard`** (default): Dispose of the component instance when use count drops to zero (standard DS behavior). + +#### Example with `retain`: + +```xml + + + retain + +``` + +#### Example with `discard`: + +```xml + + + discard + +``` + +### Use Cases + +Retention policy is particularly useful for: +- Components with expensive initialization (e.g., loading large datasets, establishing connections) +- Components that maintain caches that should persist across service usage periods +- Event handler services that are frequently used but have idle periods +- Components that provide utility services that are accessed sporadically + +### Compatibility Note + +The retention policy feature maps to the existing Felix-specific `delayedKeepInstances` extension. Components using the Felix extension attribute will continue to work: + +```xml + + + +``` + +The standard `retention-policy` element should be preferred in new component descriptors for better portability across DS implementations. + +For more details, see: +- [OSGi Issue #720](https://github.com/osgi/osgi/issues/720) +- [OSGi PR #875](https://github.com/osgi/osgi/pull/875) + ## Apache Maven Support Both, the [maven-bundle-plugin](http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html) as well as the [bnd-maven-plugin](https://github.com/bndtools/bnd/tree/master/maven) supports processing the annotations and creating the XML component descriptors. diff --git a/scr/changelog.txt b/scr/changelog.txt index a4e0b7cdcd..8069adfd54 100644 --- a/scr/changelog.txt +++ b/scr/changelog.txt @@ -7,6 +7,12 @@ Changes in 2.2.15 - See https://github.com/osgi/osgi/pull/875 and https://github.com/osgi/osgi/issues/720 - Added comprehensive documentation in README.md - Updated code comments to reflect specification compliance + * Implement Retention Policy element (OSGi R8) + - Added support for the new element from preliminary OSGi R8 spec + - Controls whether component instances are retained when use count drops to zero + - Values: "retain" (keep instances) or "discard" (dispose instances, default) + - Maps to existing delayedKeepInstances functionality for backward compatibility + - See https://github.com/osgi/osgi/pull/875 and https://github.com/osgi/osgi/issues/720 Changes in 2.2.14 ----------------- diff --git a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlConstants.java b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlConstants.java index 42624d77d3..a179a3499d 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlConstants.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlConstants.java @@ -68,6 +68,7 @@ public abstract class XmlConstants public static final String EL_PROPERTIES = "properties"; public static final String EL_PROVIDE = "provide"; public static final String EL_REF = "reference"; + public static final String EL_RETENTION_POLICY = "retention-policy"; public static final String EL_SERVICE = "service"; // Attributes @@ -101,6 +102,10 @@ public abstract class XmlConstants public static final String ATTR_DELAYED_KEEP_INSTANCES = "delayedKeepInstances"; + // Retention policy values (OSGi R8) + public static final String RETENTION_POLICY_RETAIN = "retain"; + public static final String RETENTION_POLICY_DISCARD = "discard"; + // mapping of namespace URI to namespace code public static final Map NAMESPACE_CODE_MAP; diff --git a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java index a7588f6d68..5a022b7ff0 100644 --- a/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java +++ b/scr/src/main/java/org/apache/felix/scr/impl/xml/XmlHandler.java @@ -73,6 +73,12 @@ public class XmlHandler extends DefaultHandler private StringBuilder propertyBuilder; + // Flag to indicate we're parsing retention-policy element + private boolean m_parsingRetentionPolicy = false; + + // StringBuilder for retention-policy element content + private StringBuilder m_retentionPolicyBuilder; + /** Flag for detecting the first element. */ protected boolean firstElement = true; @@ -419,6 +425,14 @@ else if ( localName.equals( XmlConstants.EL_REF ) ) m_currentComponent.addDependency( ref ); } + // 112.4.x Retention Policy element (OSGi R8) + // Controls whether component instances are kept when use count drops to zero + else if ( localName.equals( XmlConstants.EL_RETENTION_POLICY ) ) + { + m_parsingRetentionPolicy = true; + m_retentionPolicyBuilder = new StringBuilder(); + } + // unexpected element (except the root element "components" // used by the Maven SCR Plugin, which is just silently ignored) else if ( !localName.equals( XmlConstants.EL_COMPONENTS ) ) @@ -482,6 +496,32 @@ else if ( localName.equals( XmlConstants.EL_FACTORY_PROPERTY ) && m_pendingFacto } m_pendingFactoryProperty = null; } + else if ( localName.equals( XmlConstants.EL_RETENTION_POLICY ) && m_parsingRetentionPolicy ) + { + if (m_retentionPolicyBuilder != null) + { + String retentionPolicy = m_retentionPolicyBuilder.toString().trim(); + // Map OSGi R8 retention-policy values to the existing delayedKeepInstances field + // "retain" means keep instances when use count drops to zero + // "discard" means dispose instances when use count drops to zero (default) + if (XmlConstants.RETENTION_POLICY_RETAIN.equals(retentionPolicy)) + { + m_currentComponent.setDelayedKeepInstances(true); + } + else if (XmlConstants.RETENTION_POLICY_DISCARD.equals(retentionPolicy)) + { + m_currentComponent.setDelayedKeepInstances(false); + } + else + { + m_logger.log(Level.WARN, + "Invalid retention-policy value ''{0}'' (bundle {1}). Expected ''retain'' or ''discard''.", null, + retentionPolicy, m_bundle.getLocation()); + } + m_retentionPolicyBuilder = null; + } + m_parsingRetentionPolicy = false; + } } // Add implicit satisfying condition reference as per OSGi R8 Declarative Services specification // (see https://github.com/osgi/osgi/pull/875 and https://github.com/osgi/osgi/issues/720). @@ -534,6 +574,14 @@ public void characters(char[] ch, int start, int length) throws SAXException } propertyBuilder.append(String.valueOf( ch, start, length)); } + // Capture retention-policy element content + else if ( m_parsingRetentionPolicy ) + { + if (m_retentionPolicyBuilder == null) { + m_retentionPolicyBuilder = new StringBuilder(); + } + m_retentionPolicyBuilder.append(String.valueOf( ch, start, length)); + } } diff --git a/scr/src/test/java/org/apache/felix/scr/impl/xml/XmlHandlerTest.java b/scr/src/test/java/org/apache/felix/scr/impl/xml/XmlHandlerTest.java index e59e5dccc2..07970fa32a 100755 --- a/scr/src/test/java/org/apache/felix/scr/impl/xml/XmlHandlerTest.java +++ b/scr/src/test/java/org/apache/felix/scr/impl/xml/XmlHandlerTest.java @@ -140,4 +140,30 @@ private List parse(final URL descriptorURL, } } + + @Test + public void testRetentionPolicyRetain() throws Exception + { + final URL url = getClass().getResource("/retention-policy-retain.xml"); + final List components = parse(url, null); + assertEquals(1, components.size()); + + final ComponentMetadata cm = components.get(0); + cm.validate(); + assertEquals("Component should have delayedKeepInstances set to true for retention-policy=retain", + true, cm.isDelayedKeepInstances()); + } + + @Test + public void testRetentionPolicyDiscard() throws Exception + { + final URL url = getClass().getResource("/retention-policy-discard.xml"); + final List components = parse(url, null); + assertEquals(1, components.size()); + + final ComponentMetadata cm = components.get(0); + cm.validate(); + assertEquals("Component should have delayedKeepInstances set to false for retention-policy=discard", + false, cm.isDelayedKeepInstances()); + } } diff --git a/scr/src/test/resources/retention-policy-discard.xml b/scr/src/test/resources/retention-policy-discard.xml new file mode 100644 index 0000000000..a5ad052545 --- /dev/null +++ b/scr/src/test/resources/retention-policy-discard.xml @@ -0,0 +1,24 @@ + + + + + discard + diff --git a/scr/src/test/resources/retention-policy-retain.xml b/scr/src/test/resources/retention-policy-retain.xml new file mode 100644 index 0000000000..8eee88ded3 --- /dev/null +++ b/scr/src/test/resources/retention-policy-retain.xml @@ -0,0 +1,24 @@ + + + + + retain + From 650bce38f069573ebdd8684325c70f26b787595e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 2 Nov 2025 11:39:21 +0000 Subject: [PATCH 6/6] Restore Retention Policy documentation after upstream merge Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com> --- scr/README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++- scr/changelog.txt | 6 +++++ 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/scr/README.md b/scr/README.md index 8bbf468b53..98620cbf82 100644 --- a/scr/README.md +++ b/scr/README.md @@ -4,7 +4,7 @@ The Apache Felix Service Component Runtime described by the [OSGi Declarative Se The Java annotations defined by the specification make implementing components easy and reduce the amount of code that needs be written. These annotations are processed at build time and translated into XML descriptor files which in turn are listed in the `Service-Component` header of the declaring bundle. But the good news is, you usually don't have to worry about this XML, however in case things don't work as expected , it's good to know how these things work. -The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. This implementation also includes support for OSGi R8 features such as the Satisfying Condition specification. +The Apache Felix Declarative Services implementation is the reference implementation for the OSGi Declarative Services Specification Version 1.4 (R7) and therefore passes the OSGi CT. This implementation also includes support for OSGi R8 features such as the Satisfying Condition and Retention Policy specifications. ## Example Usage @@ -158,6 +158,69 @@ Satisfying conditions are useful for: For more details, see - [112.3.13 Satisfying Condition](https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-satisfying.condition) +## Retention Policy (OSGi R8) + +Apache Felix SCR implements the Retention Policy feature as specified in the OSGi R8 Declarative Services specification. This feature allows control over whether component instances are retained when their use count drops to zero. + +### Problem Statement + +Components that are expensive to activate/deactivate or that maintain caches have limited control over their lifecycle when the service use count drops to zero. They either: +- Stay permanently active with `immediate="true"` +- Get deactivated on every idle period with `immediate="false"` (default for delayed components) + +The retention policy feature solves this by allowing components to specify whether they should be retained even when not in use. + +### Using Retention Policy + +The `retention-policy` element can have two values: + +- **`retain`**: Keep the component instance active even when use count is zero. The component will not be deactivated until explicitly disabled or when dependencies become unsatisfied. +- **`discard`** (default): Dispose of the component instance when use count drops to zero (standard DS behavior). + +#### Example with `retain`: + +```xml + + + retain + +``` + +#### Example with `discard`: + +```xml + + + discard + +``` + +### Use Cases + +Retention policy is particularly useful for: +- Components with expensive initialization (e.g., loading large datasets, establishing connections) +- Components that maintain caches that should persist across service usage periods +- Event handler services that are frequently used but have idle periods +- Components that provide utility services that are accessed sporadically + +### Compatibility Note + +The retention policy feature maps to the existing Felix-specific `delayedKeepInstances` extension. Components using the Felix extension attribute will continue to work: + +```xml + + + +``` + +The standard `retention-policy` element should be preferred in new component descriptors for better portability across DS implementations. + +For more details, see +- [112.3.14 Retention Policy](https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-retention.policy) + ## Apache Maven Support Both, the [maven-bundle-plugin](http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html) as well as the [bnd-maven-plugin](https://github.com/bndtools/bnd/tree/master/maven) supports processing the annotations and creating the XML component descriptors. diff --git a/scr/changelog.txt b/scr/changelog.txt index a9d0b19d64..b393693145 100644 --- a/scr/changelog.txt +++ b/scr/changelog.txt @@ -7,6 +7,12 @@ Changes in 2.2.15 - See https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-satisfying.condition - Added comprehensive documentation in README.md - Updated code comments to reflect specification compliance + * Implement Retention Policy element (OSGi R8) + - Added support for the element from OSGi R8 specification + - Controls whether component instances are retained when use count drops to zero + - Values: "retain" (keep instances) or "discard" (dispose instances, default) + - Maps to existing delayedKeepInstances functionality for backward compatibility + - See https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-retention.policy Changes in 2.2.14 -----------------