Thank you all. Immediate was the answer to solve my problem and I will look more into ThreadPoolExecutor.
Thank you, David On Thu, Oct 6, 2016 at 9:41 AM, Thomas Watson <tjwat...@us.ibm.com> wrote: > 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 <david.daniel.1...@gmail.com> > To: OSGi Developer Mail List <osgi-dev@mail.osgi.org> > Date: 10/06/2016 08:11 AM > Subject: [osgi-dev] Service being destroyed > Sent by: osgi-dev-boun...@mail.osgi.org > ------------------------------ > > > > 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 >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev