Programmatically restarting a bundle [message #482578] |
Thu, 27 August 2009 07:08 |
Maurizio 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
|
|
|
Powered by
FUDForum. Page generated in 0.03311 seconds