You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Pierre Henry Perret <ph...@gmail.com> on 2011/02/18 15:27:12 UTC

service metadata

Hi all,

When a service is registered via the registration service , a Dictionary of
properties is passed.
What is the equivalence of this metadata Dictionary ?
Is that @ServiceProperty ?

Thanls


--
Pierre-Henry Perret

Re: service metadata

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

So, each @ServiceProperty is one entry of dictionary attached to the
service registration. If the field value is updated (by your code), iPOJO
also updates the published value.

For properties that are not attached to fields, you can also use:
@Provides(properties= {
   @StaticServiceProperty(name="p1", type="java.lang.String", value="this
is a property")
                        @StaticServiceProperty(name="p2",
type="java.lang.String", value="this is another property")
 })

Regards,

Clement


On 18.02.11 18:06, "Carl Hall" <ca...@hallwaytech.com> wrote:

>@ServiceProperty can be applied to multiple fields in a class, but can
>only
>be applied once per field.
>
>This differs from the SCR annotations that also allow multiple properties
>to
>be set at the type (class, interface) level.
>
>On Fri, Feb 18, 2011 at 10:22 AM, Pierre Henry Perret
><ph...@gmail.com>wrote:
>
>> ok,
>>
>> So why the @ServiceProperty allows only one annotation, if many
>>properties
>> cans be defined in a Dictionary , (as usually is the case in a service)
>>
>> --
>> Pierre
>>
>> 2011/2/18 Guillaume Sauthier <Gu...@objectweb.org>
>>
>> If using @ServiceProperty, you will add an entry in that Dictionary.
>> > --G
>> >
>> > Le 18/02/2011 15:27, Pierre Henry Perret a écrit :
>> >
>> >  Hi all,
>> >>
>> >> When a service is registered via the registration service , a
>>Dictionary
>> >> of
>> >> properties is passed.
>> >> What is the equivalence of this metadata Dictionary ?
>> >> Is that @ServiceProperty ?
>> >>
>> >> Thanls
>> >>
>> >>
>> >> --
>> >> Pierre-Henry Perret
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> > For additional commands, e-mail: users-help@felix.apache.org
>> >
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: service metadata

Posted by Carl Hall <ca...@hallwaytech.com>.
@ServiceProperty can be applied to multiple fields in a class, but can only
be applied once per field.

This differs from the SCR annotations that also allow multiple properties to
be set at the type (class, interface) level.

On Fri, Feb 18, 2011 at 10:22 AM, Pierre Henry Perret <ph...@gmail.com>wrote:

> ok,
>
> So why the @ServiceProperty allows only one annotation, if many properties
> cans be defined in a Dictionary , (as usually is the case in a service)
>
> --
> Pierre
>
> 2011/2/18 Guillaume Sauthier <Gu...@objectweb.org>
>
> If using @ServiceProperty, you will add an entry in that Dictionary.
> > --G
> >
> > Le 18/02/2011 15:27, Pierre Henry Perret a écrit :
> >
> >  Hi all,
> >>
> >> When a service is registered via the registration service , a Dictionary
> >> of
> >> properties is passed.
> >> What is the equivalence of this metadata Dictionary ?
> >> Is that @ServiceProperty ?
> >>
> >> Thanls
> >>
> >>
> >> --
> >> Pierre-Henry Perret
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>

Re: service metadata

Posted by Pierre Henry Perret <ph...@gmail.com>.
ok,

So why the @ServiceProperty allows only one annotation, if many properties
cans be defined in a Dictionary , (as usually is the case in a service)

--
Pierre

2011/2/18 Guillaume Sauthier <Gu...@objectweb.org>

If using @ServiceProperty, you will add an entry in that Dictionary.
> --G
>
> Le 18/02/2011 15:27, Pierre Henry Perret a écrit :
>
>  Hi all,
>>
>> When a service is registered via the registration service , a Dictionary
>> of
>> properties is passed.
>> What is the equivalence of this metadata Dictionary ?
>> Is that @ServiceProperty ?
>>
>> Thanls
>>
>>
>> --
>> Pierre-Henry Perret
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

Re: service metadata

Posted by Guillaume Sauthier <Gu...@objectweb.org>.
If using @ServiceProperty, you will add an entry in that Dictionary.
--G

Le 18/02/2011 15:27, Pierre Henry Perret a écrit :
> Hi all,
>
> When a service is registered via the registration service , a Dictionary of
> properties is passed.
> What is the equivalence of this metadata Dictionary ?
> Is that @ServiceProperty ?
>
> Thanls
>
>
> --
> Pierre-Henry Perret
>
>