Which karaf concept is used in JMXCollector to dynamically add harvester per config file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Which karaf concept is used in JMXCollector to dynamically add harvester per config file

Oliver Wulff

Hi there


I'm wondering which karaf concept or feature is used for the Decanter JMXCollector to dynamically add a harvester per config file. I haven't spotted that or found any documentation.


Thanks a lot

Oliver

As a recipient of an email from Talend, your contact personal data will be on our systems. Please see our contacts privacy notice at Talend, Inc.



Reply | Threaded
Open this post in threaded view
|

Re: Which karaf concept is used in JMXCollector to dynamically add harvester per config file

jbonofre
Hi,

It's simply a ManagedServiceFactory via SCR.

The factory is org.apache.karaf.decanter.jmx.

So, as soon as you create a config org.apache.karaf.decanter.jmx-foo

a new service is created associated with this configuration.

Regards
JB

On 21/06/2019 08:46, Oliver Wulff wrote:

> Hi there
>
>
> I'm wondering which karaf concept or feature is used for the
> Decanter JMXCollector to dynamically add a harvester per config file. I
> haven't spotted that or found any documentation.
>
>
> Thanks a lot
>
> Oliver
>
> As a recipient of an email from Talend, your contact personal data will
> be on our systems. Please see our contacts privacy notice at Talend,
> Inc. <https://www.talend.com/contacts-privacy-policy/>
>
>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Which karaf concept is used in JMXCollector to dynamically add harvester per config file

David Jencks-2
Felix SCR doesn’t use ManagedServiceFactory to implement support for factory configurations (I don’t think it’s actually possible), so what your description literally can only mean is that you have a DS component implementing ManagedServiceFactory. This is possible but rather unusual. I rather suspect you actually have a configuration required DS component and provide factory configurations to get multiple instances?

Do you mean that the factory pid is org.apache.karaf.decanter.jmx?

Many people seem to have trouble understanding how this part of SCR works and much of the terminology uses the same words in a different order so I think being very careful or perhaps pedantic about terminology, while annoying to write:-) is worth the time.

Thanks
David Jencks

Sent from my iPhone

> On Jun 21, 2019, at 12:13 AM, Jean-Baptiste Onofré <[hidden email]> wrote:
>
> Hi,
>
> It's simply a ManagedServiceFactory via SCR.
>
> The factory is org.apache.karaf.decanter.jmx.
>
> So, as soon as you create a config org.apache.karaf.decanter.jmx-foo
>
> a new service is created associated with this configuration.
>
> Regards
> JB
>
>> On 21/06/2019 08:46, Oliver Wulff wrote:
>> Hi there
>>
>>
>> I'm wondering which karaf concept or feature is used for the
>> Decanter JMXCollector to dynamically add a harvester per config file. I
>> haven't spotted that or found any documentation.
>>
>>
>> Thanks a lot
>>
>> Oliver
>>
>> As a recipient of an email from Talend, your contact personal data will
>> be on our systems. Please see our contacts privacy notice at Talend,
>> Inc. <https://www.talend.com/contacts-privacy-policy/>
>>
>>
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Which karaf concept is used in JMXCollector to dynamically add harvester per config file

jbonofre
You are right David (even a little rude, whatever), my wording was not
accurate.

I tried to mean that we are using factory SIMILAR (but not the same as)
to ManagedFactory.

Regards
JB

On 21/06/2019 17:40, David Jencks wrote:

> Felix SCR doesn’t use ManagedServiceFactory to implement support for factory configurations (I don’t think it’s actually possible), so what your description literally can only mean is that you have a DS component implementing ManagedServiceFactory. This is possible but rather unusual. I rather suspect you actually have a configuration required DS component and provide factory configurations to get multiple instances?
>
> Do you mean that the factory pid is org.apache.karaf.decanter.jmx?
>
> Many people seem to have trouble understanding how this part of SCR works and much of the terminology uses the same words in a different order so I think being very careful or perhaps pedantic about terminology, while annoying to write:-) is worth the time.
>
> Thanks
> David Jencks
>
> Sent from my iPhone
>
>> On Jun 21, 2019, at 12:13 AM, Jean-Baptiste Onofré <[hidden email]> wrote:
>>
>> Hi,
>>
>> It's simply a ManagedServiceFactory via SCR.
>>
>> The factory is org.apache.karaf.decanter.jmx.
>>
>> So, as soon as you create a config org.apache.karaf.decanter.jmx-foo
>>
>> a new service is created associated with this configuration.
>>
>> Regards
>> JB
>>
>>> On 21/06/2019 08:46, Oliver Wulff wrote:
>>> Hi there
>>>
>>>
>>> I'm wondering which karaf concept or feature is used for the
>>> Decanter JMXCollector to dynamically add a harvester per config file. I
>>> haven't spotted that or found any documentation.
>>>
>>>
>>> Thanks a lot
>>>
>>> Oliver
>>>
>>> As a recipient of an email from Talend, your contact personal data will
>>> be on our systems. Please see our contacts privacy notice at Talend,
>>> Inc. <https://www.talend.com/contacts-privacy-policy/>
>>>
>>>
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email]
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com