You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jan Thomä <ko...@insomnia-hq.de> on 2008/04/21 21:32:20 UTC
Bundle update doesn't seem to have any effect
Hi,
i am starting up an embedded instance of felix. Inside that instance i
install and start a bundle. Now when i detect a change of the jar file that
this bundle was installed from, i call bundle.update() for the given bundle.
This restarts the bundle, however the code changes i made to the bundle
don't seem to be propagated == it still looks like the old classes are being
used. I also tried uninstalling the bundle and then reinstalling it, but
still the old classes were in use. I was under the impression that updating
the bundle should update the classes within that bundle and i actually need
this feature to minimize coding roundtrip times. So two questions:
1. is updating (or uninstalling/installing/starting) the bundle supposed to
update classes that are contained within the bundle?
2. If so, what could I have done wrong so that the classes are not updated?
Thank you for your help.
Best regards,
Jan
--
View this message in context: http://www.nabble.com/Bundle-update-doesn%27t-seem-to-have-any-effect-tp16809867p16809867.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Bundle update doesn't seem to have any effect
Posted by Jan Thomä <ko...@insomnia-hq.de>.
Richard, Karl,
thanks a lot, using the refreshPackages stuff works like a charm :)
Best regards,
Jan
--
View this message in context: http://www.nabble.com/Bundle-update-doesn%27t-seem-to-have-any-effect-tp16809867p16823501.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Bundle update doesn't seem to have any effect
Posted by "Richard S. Hall" <he...@ungoverned.org>.
I just added an FAQ for this question:
http://cwiki.apache.org/FELIX/apache-felix-osgi-faq.html
-> richard
Karl Pauls wrote:
> My guess would be that your bundle is exporting a package that is used
> by a different bundle. In that case the old revision is still going to
> hang around after an update/uninstall until the bundle is refreshed --
> hence, try to refresh the bundle/framework.
>
> You can refresh the bundle by using the
> PackageAdmin.refreshPackages(new Bundle[]{bundle}); service method.
> Use null as parameter to refresh all bundles pending a refresh in the
> framework.
>
> regards,
>
> Karl
>
>
>> Hi,
>>
>> i am starting up an embedded instance of felix. Inside that instance i
>> install and start a bundle. Now when i detect a change of the jar file that
>> this bundle was installed from, i call bundle.update() for the given bundle.
>> This restarts the bundle, however the code changes i made to the bundle
>> don't seem to be propagated == it still looks like the old classes are being
>> used. I also tried uninstalling the bundle and then reinstalling it, but
>> still the old classes were in use. I was under the impression that updating
>> the bundle should update the classes within that bundle and i actually need
>> this feature to minimize coding roundtrip times. So two questions:
>>
>> 1. is updating (or uninstalling/installing/starting) the bundle supposed to
>> update classes that are contained within the bundle?
>> 2. If so, what could I have done wrong so that the classes are not updated?
>>
>> Thank you for your help.
>>
>>
>> Best regards,
>> Jan
>> --
>> View this message in context: http://www.nabble.com/Bundle-update-doesn%27t-seem-to-have-any-effect-tp16809867p16809867.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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: Bundle update doesn't seem to have any effect
Posted by Karl Pauls <ka...@gmail.com>.
My guess would be that your bundle is exporting a package that is used
by a different bundle. In that case the old revision is still going to
hang around after an update/uninstall until the bundle is refreshed --
hence, try to refresh the bundle/framework.
You can refresh the bundle by using the
PackageAdmin.refreshPackages(new Bundle[]{bundle}); service method.
Use null as parameter to refresh all bundles pending a refresh in the
framework.
regards,
Karl
> Hi,
>
> i am starting up an embedded instance of felix. Inside that instance i
> install and start a bundle. Now when i detect a change of the jar file that
> this bundle was installed from, i call bundle.update() for the given bundle.
> This restarts the bundle, however the code changes i made to the bundle
> don't seem to be propagated == it still looks like the old classes are being
> used. I also tried uninstalling the bundle and then reinstalling it, but
> still the old classes were in use. I was under the impression that updating
> the bundle should update the classes within that bundle and i actually need
> this feature to minimize coding roundtrip times. So two questions:
>
> 1. is updating (or uninstalling/installing/starting) the bundle supposed to
> update classes that are contained within the bundle?
> 2. If so, what could I have done wrong so that the classes are not updated?
>
> Thank you for your help.
>
>
> Best regards,
> Jan
> --
> View this message in context: http://www.nabble.com/Bundle-update-doesn%27t-seem-to-have-any-effect-tp16809867p16809867.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Karl Pauls
karlpauls@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org