If you make the component immediate then it will always get activated, 
even if no other component uses it, and it will only get deactivated if it 
becomes unsatisfied or its bundle is stopped.

Tom





From:   David Daniel <[email protected]>
To:     OSGi Developer Mail List <[email protected]>
Date:   10/06/2016 08:11 AM
Subject:        [osgi-dev] Service being destroyed
Sent by:        [email protected]



I have a service and it has a private blocking queue variable

On activate it registers an eventhandler that writes to the queue on an 
event.  It also starts a thread that watches the blocking queue.

My problem is that it is getting destroyed because nothing else depends on 
the service.  Is there a way to keep the service alive so the eventhandler 
is not garbage collected

Thanks for any help,
  David_______________________________________________
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

Reply via email to