Hi BJ,
Yeaah, remove the configuration and the service was unregistered, work
perfectly. that is sooo cool ! I just love it... :)
thanks a lot for the help.
regards,
Cristiano
On 25/04/13 22:00, BJ Hargrave wrote:
If you are causing DS to create a component instance and register it
as a new service by creating a factory configuration, you can delete
the factory configuration to get DS to destroy the component instance.
If you are using ComponentFactory, then you can use the returned
ComponentInstance to destroy the component instance.
--
*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: Cristiano Gavião <[email protected]>
To: OSGi Developer Mail List <[email protected]>
Date: 2013/04/25 19:13
Subject: [osgi-dev] Best way to unregister a service when it was
registered by DS using CM Factory PID ?
Sent by: [email protected]
------------------------------------------------------------------------
Hello,
I've created a component that is tracking for other bundle activations.
if those bundles has some special manifest properties I'm registering a
service for each and I keep the service registration object. If the
bundle were deactivated I'm unregistering the service using the saved
service registration object. So far so good.
As I need multiple instances of such component service, now I'm
experiment a new approach. I'm registering the service using DS and
Configuration Admin Service
(http://njbartlett.name/2010/07/19/factory-components-in-ds.html)
I don't have the service registration object anymore... So the doubt is
how would be the best way to unregister a service that was created when
I added a factory PID for the component ?
thanks,
Cristiano
_______________________________________________
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