You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2009/07/17 12:28:18 UTC
Updating a bundle in STARTING state
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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Updating a bundle in STARTING state
Posted by "Richard S. Hall" <he...@ungoverned.org>.
I think the spec says the framework should wait when it performs a stop
on a STARTING bundle, but it is acceptable to timeout. Felix essentially
has an immediate timeout, i.e., it throws an exception immediately.
-> richard
On 7/17/09 6:28 AM, 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Updating a bundle in STARTING state
Posted by Sahoo <Sa...@Sun.COM>.
No, I never got any reply. Not sure what happened, but I do see your
reply in nabble.com:
http://www.nabble.com/Updating-a-bundle-in-STARTING-state-tt24532030.html#a24532030
.
Would you mind resending it so that I can reply, otherwise my reply will
look out of context?
Thanks,
Sahoo
Richard S. Hall wrote:
> I responded to this, did it not go through?
>
> -> richard
>
> On 7/23/09 11:17 PM, Sahoo wrote:
>> 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: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Updating a bundle in STARTING state
Posted by "Richard S. Hall" <he...@ungoverned.org>.
I responded to this, did it not go through?
-> richard
On 7/23/09 11:17 PM, Sahoo wrote:
> 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: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Updating a bundle in STARTING state
Posted by Sahoo <Sa...@Sun.COM>.
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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org