Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Service still used after stopping / uninstalling the service (ServiceTrackerCustomizer)
Service still used after stopping / uninstalling the service (ServiceTrackerCustomizer) [message #121874] Thu, 27 November 2008 21:49 Go to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi,

I have created a simple service example with the usage of a
servicetracker. The service provides "famous" quotes and my service
consumer should use a service tracker to trace this service.

Once the service gets activated the consumer starts a thread (as a
static inner class) which polls the service every 5 seconds for a quote.

What surprises my that if I remove the service the thread still
continues to run successfully. Even if I remove the consumer the thread
happily continous to write quotes to the console.

Any idea what might be the problem?

My assumption would have been that after I stop / uninstalled the
service it would not be possible to call it anymore or that I would
receive an error message.

The example is in detail described here:
http://www.vogella.de/articles/OSGi/article.html#osgiservice

Or for a screenshot with the strange behaviour please see at the end of
this chapter (console screenshot):
http://www.vogella.de/articles/OSGi/article.html#osgiservice _servicetracker

Best regards, Lars
Re: Service still used after stopping / uninstalling the service (ServiceTrackerCustomizer) [message #122081 is a reply to message #121874] Mon, 01 December 2008 19:15 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

I issued a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=257120
> Hi,
>
> I have created a simple service example with the usage of a
> servicetracker. The service provides "famous" quotes and my service
> consumer should use a service tracker to trace this service.
>
> Once the service gets activated the consumer starts a thread (as a
> static inner class) which polls the service every 5 seconds for a quote.
>
> What surprises my that if I remove the service the thread still
> continues to run successfully. Even if I remove the consumer the thread
> happily continous to write quotes to the console.
>
> Any idea what might be the problem?
>
> My assumption would have been that after I stop / uninstalled the
> service it would not be possible to call it anymore or that I would
> receive an error message.
>
> The example is in detail described here:
> http://www.vogella.de/articles/OSGi/article.html#osgiservice
>
> Or for a screenshot with the strange behaviour please see at the end of
> this chapter (console screenshot):
> http://www.vogella.de/articles/OSGi/article.html#osgiservice _servicetracker
>
> Best regards, Lars
>
Previous Topic:Managing large sets of OSGi bundles on Equinox
Next Topic:How to automatically add an update site in "Available Software"
Goto Forum:
  


Current Time: Fri Apr 26 05:52:58 GMT 2024

Powered by FUDForum. Page generated in 0.02702 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top