By the way, you also have a "core" example here:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-managed-factory

and the equivalent with SCR:

https://github.com/apache/karaf/tree/master/examples/karaf-config-example/karaf-config-example-scr

Regards
JB

On 25/03/2019 15:39, Jean-Baptiste Onofré wrote:
> Hi Matthias,
> 
> What about creating a new service instance with a ManagedServiceFactories ?
> 
> If you use SCR, it's pretty easy. It's the way it's implemented in
> Decanter for instance.
> 
> For instance, a new TailerListenerAdapter service will be registered for
> each etc/org.apache.karaf.decanter.collector.file-foo.cfg file created:
> 
> https://github.com/apache/karaf-decanter/blob/master/collector/file/src/main/java/org/apache/karaf/decanter/collector/file/DecanterTailerListener.java
> 
> Is it what you are looking for ?
> 
> Regards
> JB
> 
> On 25/03/2019 15:32, Matthias Leinweber wrote:
>> Hello Karaf Team, 
>>
>>
>> i don't know if it is the correct mailing list, because its just
>> possibly related to karaf specific implementation.
>>
>>
>> I try to configure multiple services which are created by a component
>> factory (newInstance). But i don't find a way how i can give a
>> unique pid to a created service instance. 
>>
>> Did i understand something wrong an do i have to use
>> ManagedServiceFactories?
>>
>> regards,
>> Matthias
>>
>>
>> Matthias Leinweber 
>>
>> Managing Director & Chief Analytics Officer
>>
>>  1491765456561_darkwtext.resized.png
>>
>> Intelligent Data Analytics GmbH & Co. KG 
>>
>>  
>>
>> c/o TechQuartier 
>>
>> Platz der Einheit 2 
>> 60327 Frankfurt 
>>
>> Mobil: 0151/73006079 
>>
>> Telefon: 06421/4805274  
>> Telefax: 06421/4805275  
>> E-Mail: [email protected] 
>>
>> Internet: www.ida-analytics.de 
>>  
>>
>> Unternehmenssitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main, Registernummer: HRA 49357 | USt.
>> ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main 
>>
>> Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics
>> GmbH | Sitz: Frankfurt am Main | Handelsregister
>> beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
>> 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Dipl.-Inf.
>> Matthias Leinweber, Dipl.-Inf. Marc Seidemann 
>>
>>   
>>
>> If you are not the addressee, please inform us immediately that you have
>> received this e-mail by mistake, and delete it. We thank you for your
>> support. 
>>
>>
>>  
>>
>> Besuchen Sie uns vom 01.-05. April auf der HANNOVER MESSE. Sie finden
>> uns auf dem hessischen Gemeinschaftsstand in Halle 6 Stand A24. Weitere
>> Informationen finden Sie hier.
>> <https://www.digitalstrategie-hessen.de/hannovermesse>
>>
>>
> 

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

Reply via email to