You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Benson Margulies <be...@basistech.com> on 2016/09/14 21:15:13 UTC

DS and immediate and configurationPolicy == REQUIRE

I'm hoping I know the answer to the following:

Assume a DS component with immediate=true and configurationPolicy=REQUIRE.

When Karaf starts up, there's no config on the pid. The component won't start.

If I then use the ConfigurationAdmin service to dynamically define
some configuration, will it?

Re: DS and immediate and configurationPolicy == REQUIRE

Posted by Benson Margulies <be...@basistech.com>.
On Wed, Sep 14, 2016 at 5:21 PM, David Jencks <da...@gmail.com> wrote:
> Well there’s also references…. but if all the required references (using possible target filter properties from the configuration) are satisfied then it should start up when the configuration event arrives.  At least it will create the manager and look around for the references.
>
>
> Note that the service registration is done before the “immediate” component instance creation so that if there’s a “waiting reference” the component instance creation will be done as a result of that reference’s getService call rather than due to the “immediate” setting.  A few years ago this caused lots of deadlocks but I haven’t seen any for a long time.

This is all good news. I have a set of microservices; each one is an
@Component, no one calls for them by @Reference, they don't even list
any service interfaces. I have been asked to make it easier to
configure the overall package to run only a subset.

>
> david jencks
>
>> On Sep 14, 2016, at 2:15 PM, Benson Margulies <be...@basistech.com> wrote:
>>
>> I'm hoping I know the answer to the following:
>>
>> Assume a DS component with immediate=true and configurationPolicy=REQUIRE.
>>
>> When Karaf starts up, there's no config on the pid. The component won't start.
>>
>> If I then use the ConfigurationAdmin service to dynamically define
>> some configuration, will it?
>

Re: DS and immediate and configurationPolicy == REQUIRE

Posted by David Jencks <da...@gmail.com>.
Well there’s also references…. but if all the required references (using possible target filter properties from the configuration) are satisfied then it should start up when the configuration event arrives.  At least it will create the manager and look around for the references.


Note that the service registration is done before the “immediate” component instance creation so that if there’s a “waiting reference” the component instance creation will be done as a result of that reference’s getService call rather than due to the “immediate” setting.  A few years ago this caused lots of deadlocks but I haven’t seen any for a long time.

david jencks

> On Sep 14, 2016, at 2:15 PM, Benson Margulies <be...@basistech.com> wrote:
> 
> I'm hoping I know the answer to the following:
> 
> Assume a DS component with immediate=true and configurationPolicy=REQUIRE.
> 
> When Karaf starts up, there's no config on the pid. The component won't start.
> 
> If I then use the ConfigurationAdmin service to dynamically define
> some configuration, will it?