Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Programmatically restarting a bundle
Programmatically restarting a bundle [message #482578] Thu, 27 August 2009 07:08
Maurizio  is currently offline Maurizio Friend
Messages: 34
Registered: July 2009
Member
Hi,
I already posted a message on this argument, where I notified an exception
that I was getting when trying to programmatically re-start a bundle when
it was stopped, eventually due to an exception (ref. msg on the 23rd
August).

I implemented a bundle listener, and on the "BundleEvent.STOPPED" type of
event being fired for the requested bundle I invoked its "start()" method
in order to restarting it. There I got an error message:
"
org.osgi.framework.BundleException: State change in progress for bundle
"file:/C:/LocalRepository/equinox/Ese1/criticalBundle.jar" by thread "OSGi
Console".
...
"

After some testing I discovered that invoking the "start()" metod of such
bundle in a separate thread makes the system working as I was initially
expecting, so now my question is:
is this the way I should follow or I just got a "nice side effect" that is
not my definitive solution?

Any hint will be appreciated very much.
Kind regards.
Maurizio
Previous Topic:Equinox application not working
Next Topic:installing from feature based repository failed
Goto Forum:
  


Current Time: Tue Sep 24 05:14:46 GMT 2024

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

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

Back to the top