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

Fix handling of immediate attribute of component factories

    XMLWordPrintableJSON

Details

    Description

      According to the clarification regarding the immediate attribute of the <component> element of a Declarative services component, the validation of the component element has to be changed.

      Currently the validation assumes this definition of the immediate attribute 112.4.3:

      "immediate - Controls whether component configurations must be immediately activated after becoming satisfied or whether activation should be delayed. The default value is false if the service element is specified and true otherwise. If this attribute is specified, its value must be true unless the service element is also specified."

      which does not take into account factory components.

      A better description would be:

      "immediate - Controls whether component configurations must be immediately activated after becoming satisfied or whether activation should be delayed. The default value is false if the factory attribute or if the service element is specified and true otherwise. If this attribute is specified, its value must be false if the factory attribute is also specified or must be true unless the service element is also specified."

      This means:

      • The "scr" ComponentMetadata class must assume a different default value for the immediate attribute for component factories and validate differently.
      • The "maven-scr-plugin" Component class must assume a different default value for the immediate attribute for component factories and validate differently.

      [1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg00092.html

      Attachments

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              fmeschbe Felix Meschberger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: