Any comments?

Sahoo wrote:
What should be the behavior when a bundle gets updated in STARTINg state. e.g, say a bundle tries to update itself in its own Bundle-Activator's start() method.

I tried with a simple example and got the following exception:
org.osgi.framework.BundleException: Bundle sahoo.osgi-tests.bundle-self-start [7] cannot be update, since it is either starting or stopping.
       at org.apache.felix.framework.Felix.updateBundle(Felix.java:1536)
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:792) at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:779)
       at sahoo.osgitest1.Foo.start(Foo.java:63)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
       at org.apache.felix.framework.Felix.startBundle(Felix.java:1458)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:774) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:755) at org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:751) at org.apache.felix.fileinstall.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:771) at org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:354) at org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:120)

But, the spec suggests (see javadocs of update()) that it is OK to update a bundle in STARTING state.

Thanks,
Sahoo

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to