You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Andriyko (JIRA)" <ji...@apache.org> on 2011/02/01 05:14:28 UTC

[jira] Created: (FELIX-2815) Difference between "instance" and "provides"

Difference between "instance" and "provides"
--------------------------------------------

                 Key: FELIX-2815
                 URL: https://issues.apache.org/jira/browse/FELIX-2815
             Project: Felix
          Issue Type: Bug
          Components: Felix Commons
            Reporter: Andriyko


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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier resolved FELIX-2815.
--------------------------------------

    Resolution: Fixed

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991250#comment-12991250 ] 

Andriyko commented on FELIX-2815:
---------------------------------

Thank you, this makes it clear.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier updated FELIX-2815:
-------------------------------------

    Component/s:     (was: Felix Commons)
                 iPOJO
       Assignee: Clement Escoffier

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier resolved FELIX-2815.
--------------------------------------

    Resolution: Fixed

I've updated the page (will be sync soon).
 
I've added an example describing what is instance reconfiguration and how it does impact the published service properties.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991249#comment-12991249 ] 

Richard S. Hall commented on FELIX-2815:
----------------------------------------

Well, I was doing it from memory. :-)

There are lot of concepts, so it is difficult to get everything organized perfectly. In truth, iPOJO is probably our best documented subproject...thanks to Clement! Still, everything can be improved.

Regarding @Provides, yes, you are correct, you must be explicit to say what, if any, services a component provides. Just because a component implements an interface, that doesn't mean that it is necessarily a service. However, the default for @Provides is to assume all implemented interfaces are services, but it also allows you to explicit specify which of the implemented interfaces should be exposed as services.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991247#comment-12991247 ] 

Richard S. Hall commented on FELIX-2815:
----------------------------------------

The page is under "Documentation->User guide->Instances and factories".

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991246#comment-12991246 ] 

Richard S. Hall commented on FELIX-2815:
----------------------------------------

I'm not sure how else to say it. Defining the component is equivalent to defining a class that implements some interface. Creating and instance of the component is equivalent to doing "new" on the a class. Just like a class is not an instance of its implemented interfaces until you actually create an object, neither does a component actually provide its service until it is instantiated. The only difference between the two is that a componen may have dependencies that if not satisfied may prevent the instance from being created, thus preventing its service from being published and this can also change at runtime. Otherwise, the concepts are the same.

To give you an example of why you might want this, imagine you have some class that provides some remote service on a configurable port number. In Java you might do something like this:

    Service s1 = new org.foo.ServiceImpl(6666);
    Service s2 = new org.foo.ServiceImpl(6667);
    Service s2 = new org.foo.ServiceImpl(6668);

In iPOJO you could specify the port as a configurable property in your <component> declaration, then you could do something like this:

    <instance component="org.foo.ServiceImpl">
        <property name="port" value="6666"/>
    </instance>
    <instance component="org.foo.ServiceImpl">
        <property name="port" value="6667"/>
    </instance>
    <instance component="org.foo.ServiceImpl">
        <property name="port" value="6668"/>
    </instance>

So, just like classes and objects separate types and instances in Java, components and component instances provide the same separation in iPOJO.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andriyko reopened FELIX-2815:
-----------------------------


Sorry, but it is STILL not clear what the "instance" is. Why do we need it?

It is first referred to under the section titled "Service Publication", as:

"The service is published as long as the instance is valid."

What instance??? You never introduced the notion of an instance before, and it is confusing.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991245#comment-12991245 ] 

Andriyko edited comment on FELIX-2815 at 2/7/11 12:27 AM:
----------------------------------------------------------

That is indeed a useful link - and probably should be linked to from this documentation page.
It would be great if the page either had a "Prerequisites" section or there was a lead there.

In fact, I am not able to find the "iPOJO Factories Principles" from the navigation menu.

      was (Author: drozzy):
    That is indeed a useful link - and probably should be linked to from this documentation page.
It would be great if the page either had a "Prerequisites" section or there was a lead there.

In fact, I am not able to find the page from the navigation menu.
  
> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991244#comment-12991244 ] 

Andriyko commented on FELIX-2815:
---------------------------------

So  "defining" the component not sufficient to say that it "provides" some service?
So then the "instance" is like registering the service with the central service repository?

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991242#comment-12991242 ] 

Richard S. Hall commented on FELIX-2815:
----------------------------------------

Think of standard Java, you can define a class as implementing some interface. However, this is not sufficient to actually use the class, you need to use "new" to create an instance. This is the same with iPOJO components. You define the <component> (i.e., the type) and say that it <provides> some service (i.e., the interfaces it implements) , but this just defines the component type. You still need to create an instance of the component.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991243#comment-12991243 ] 

Richard S. Hall commented on FELIX-2815:
----------------------------------------

This distinction is also discussed here: http://felix.apache.org/site/how-to-use-ipojo-factories.html

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991245#comment-12991245 ] 

Andriyko commented on FELIX-2815:
---------------------------------

That is indeed a useful link - and probably should be linked to from this documentation page.
It would be great if the page either had a "Prerequisites" section or there was a lead there.

In fact, I am not able to find the page from the navigation menu.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Andriyko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991248#comment-12991248 ] 

Andriyko commented on FELIX-2815:
---------------------------------

Firstly thank you for the explanation.

But, I was referring to the need for the @Provides annotation. I thought it was redundant - but now that I think about it, I see that some components use the @Requires annotation, so we must explicitly say what we want the component to act like.

Regarding my note about being unable to find the page you are referring to, it was more of a complaint about the navigation system of the site, and not really an inquiry of how to find it :-) There are a few problems:

1. Biggest problem is that user is not able to see where they are currently on the site. There is not "breadcrumbs", or selected item in the navigation.
2. Next - the name of the pages do not match their name in the Navigation menu. Even in this case the name of the page is "iPOJO Factories Principles" while it is called "Factories and Instances" in the navigation (note here, that even you got it wrong ;-)

Thank you very much for the help. It is slowly coming together now.

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (FELIX-2815) Difference between "instance" and "provides"

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991434#comment-12991434 ] 

Clement Escoffier commented on FELIX-2815:
------------------------------------------

Hi,

I've added a link to the 'factory/instance' page from the {{provides}} page. 

I definitely agree about the navigation, it should be completely redone. Unfortunately, I lack of time. Especially, the content is still on Confluence, and reaching the current state was really not easy (and I still have some issue: modifying the menu force me to edit *all* pages and re-save them, if not the sync do not update them). I've learned that Apache projects are migrating to a CMS, which might make the documentation support easier. 

> Difference between "instance" and "provides"
> --------------------------------------------
>
>                 Key: FELIX-2815
>                 URL: https://issues.apache.org/jira/browse/FELIX-2815
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Andriyko
>            Assignee: Clement Escoffier
>              Labels: documentation, felix,, ipojo
>
> 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>

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira