Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-924

No component instance if no Configuration

    XMLWordPrintableJSON

    Details

      Description

      A way is needed for the component declaration to say only create a component configuration IF there is a Configuration( or Configurations).

      To support this, the follow attribute is added to the component element:

      <attribute name="configuration-policy" type="scr:Tconfiguration-policy"
      default="optional" use="optional" />
      <simpleType name="Tconfiguration-policy">
      <restriction base="string">
      <enumeration value="optional" />
      <enumeration value="require" />
      <enumeration value="ignore" />
      </restriction>
      </simpleType>

      If the attribute is present and set to require, then a component cannot be satisfied (section 112.5.2) unless there is a Configuration in ConfigurationAdmin for the component. In this situation, the No Configuration case in 112.7 does not apply.If the component is a Factory Component and the component is not satisfied because there is no Configuration present, then the ComponentFactory service will not be registered.

      If the attribute is present and set to ignore, then ConfigurationAdmin will not be consulted for the component. In this situation, only the No Configuration case in 112.7 applies.

      If the attribute is not present or present and set to optional, then SCR will act as it did prior to this RFC. That is, a Configuration will be used if present in ConfigurationAdmin.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fmeschbe Felix Meschberger
                Reporter:
                fmeschbe Felix Meschberger
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: