felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andriyko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-2815) Difference between "instance" and "provides"
Date Mon, 07 Feb 2011 00:45:30 GMT

    [ 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
> 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


View raw message