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

Difference between "instance" and "provides"

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • iPOJO

    Description

      In the documentation on iPOJO Services:
      http://felix.apache.org/site/providing-osgi-services.html#ProvidingOSGiservices-Instancereconfiguration

      There is no clear explanation of what is the difference between <provides> and <instance>.
      It is not clear why "instance" is needed at all.

      Under the "Service Properties" heading on the page, the two are used interchangeably in the examples.

      For example, first "property" is configured with <provides>:

      <component classname="...FooProviderType1">
      <provides>
      <property name="foo" field="m_foo" value="Foo"/>
      <property name="static" type="java.lang.String" value="this is a static property"/>
      </provides>
      </component>

      and then immediately, with no explanation what-so-ever and <intsance> is used, with a tiny explanation that "The value can be given in the instance configuration":

      <instance component="...FooProviderType1">
      <property name="foo" value="My New Foo Value"/>
      <property name="static" value="My Value For Static"/>
      </instance>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            clement.escoffier Clement Escoffier
            drozzy Andriyko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment