I assume you mean that the component is destroyed. You should make the component ‘immediate’. This decouples the lifecycle of the component from its provided service, i.e. the component is always around even when nobody is consuming its service.
For example: @Component(immediate=true …) Regards Neil > On 6 Oct 2016, at 14:09, David Daniel <david.daniel.1...@gmail.com> wrote: > > 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 > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev