Hi,
I want to thanks both BJ and Felix for clarifying this.
In general term, i think that maybe an article explaining DS in depth
and it's relation with Configuration Admin is really needed.
Andrea
BJ Hargrave ha scritto:
Yes to all.
--
*BJ Hargrave*
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_
[email protected]_ <mailto:[email protected]>
office: +1 386 848 1781
mobile: +1 386 848 3788
From: Felix Meschberger <[email protected]>
To: OSGi Developer Mail List <[email protected]>
Date: 2009/06/16 18:22
Subject: Re: [osgi-dev] Declarative Services Question...
Sent by: [email protected]
------------------------------------------------------------------------
Hi,
Again, I stand corrected. Thanks for clarifying this to -- and I thought
this was clear to me after having read these parts of the spec about 10
times.
Does this mean, that all factory component instances receive the same
configuration data from the configuration admin (besides the properties
from the newInstance method and the component properties) identified by
the component.name ?
And each factory component instance (if registered as a service) is
registered with the same component.name service property ?
The component.factory service property on the other hand is only used
for the service properties of the ComponentFactory service itself ?
Thanks and Regards
Felix
BJ Hargrave schrieb:
> Factory components (which we are talking about here) and factory
> configurations are not compatible and cannot be used together. See
112.7:
>
> "A factory configuration must not be used if the component is a factory
> com-
> ponent. This is because SCR is not free to create component
configurations
> as necessary to support multiple Configurations. When SCR detects this
> condition, it must log an error message with the Log Service, if
> present, and
> ignore the component description."
> --
>
> *BJ Hargrave*
> Senior Technical Staff Member, IBM
> OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_
> [email protected]_ <mailto:[email protected]>
>
> office: +1 386 848 1781
> mobile: +1 386 848 3788
>
>
>
>
> From: Felix Meschberger <[email protected]>
> To: OSGi Developer Mail List <[email protected]>
> Date: 2009/06/16 16:31
> Subject: Re: [osgi-dev] Declarative Services
Question...
> Sent by: [email protected]
>
>
> ------------------------------------------------------------------------
>
>
>
> Hi,
>
> BJ Hargrave schrieb:
>> That is not correct. SCR will never create factory component instances.
>> They are only created by calling newInstance on the factory. SCR must
>> deactivate instances if a dependency of the factory goes away. They
must
>> be "manually" recreated, if necessary, once the dependency is
>> reestablished.
>
> Correct, unless the factory component instances have been created by
> SCR itself upon factory configurations from Configuration Admin, right ?
>
> Regards
> Felix
>
>> --
>>
>> *BJ Hargrave*
>> Senior Technical Staff Member, IBM
>> OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_
>> [email protected]_ <mailto:[email protected]>
>>
>> office: +1 386 848 1781
>> mobile: +1 386 848 3788
>>
>>
>>
>>
>> From: Felix Meschberger <[email protected]>
>> To: OSGi Developer Mail List <[email protected]>
>> Date: 2009/06/16 16:15
>> Subject: Re: [osgi-dev] Declarative Services
Question...
>> Sent by: [email protected]
>>
>>
>>
------------------------------------------------------------------------
>>
>>
>>
>> Hi,
>>
>> Andrea Zoppello schrieb:
>>> Hi All,
>>>
>>> In last weeks i've played a lot with declarative services and ds
>>> factories, and i could say
>>> i'm very satisfied about that.
>>>
>>> BTW i'm still have a little doubt where i need to go in more further
>>> details.
>>>
>>> In my system, i've both declarative services, and ds factories.
>>>
>>> In particular suppose that
>>>
>>> S1 - Is a standard declarative service ( not a component factories )
>>> F - Is a DS Component Factory
>>> F1..FN are n instances created by F factory component
>>>
>>> And the suppose tha the factory component have a 1..1 dependency on S1
>>>
>>> Now suppose i want to update the implementation of "S1", when i
stop the
>>> bundle exposing "S1" all
>>> the services instances F1..FN created with the component factory F
will
>>> be deactivaded.
>>>
>>> This is correct but i would like that when S1 will be restarted F1..F2
>>> will be reactivaded again..
>>>
>>> I suppose i need to handle this manually myself... but i'd like to
>>> discuss with the
>>> community bwich is the best way to do that.
>>
>> As I understand the specification the DS implementation should activate
>> your factory instances F1..FN again as soon as the dependency becomes
>> satisfied again.
>>
>> Regards
>> Felix
>>
>>>
>>>
>>> Thx
>>>
>>> Andrea Zoppello
>>> _______________________________________________
>>> OSGi Developer Mail List
>>> [email protected]
>>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>>
>>
>> _______________________________________________
>> OSGi Developer Mail List
>> [email protected]
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
>>
>>
>>
------------------------------------------------------------------------
>>
>> _______________________________________________
>> OSGi Developer Mail List
>> [email protected]
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
------------------------------------------------------------------------
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev