You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by anair <as...@yahoo.com> on 2013/03/06 20:50:45 UTC

Clear the data cache for Karaf 2.3.x for a specific bundle

Hello,

I am looking at a requirement which requires me to clear only the karaf
cache for a specific bundle. I know I can clear the entire cache using the
'clean' command on start-up. However, I want the cache for the specific
bundle to be clear while karaf is running. I tried osgi:refresh <bundle_id>
--force, but did not clear out the cache in the data folder. Is there a
command to delete the cache for that specific bundle alone? uninstall and
install command will delete and recreate the cache, however, I want to know
if there is a way to clear the cache without uninstalling a bundle.

Thank you for your time. Any input is greatly appreciated.

Regards,

Asha



--
View this message in context: http://karaf.922171.n3.nabble.com/Clear-the-data-cache-for-Karaf-2-3-x-for-a-specific-bundle-tp4028037.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Clear the data cache for Karaf 2.3.x for a specific bundle

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

A refresh does only re-wire the bundle and it's dependencies.
An update will un-install install the bundle.

The refresh without any bundle id will do a rewiring of all bundles.

Regards Achim

sent from mobile device
Am 07.03.2013 18:28 schrieb "anair" <as...@yahoo.com>:

> Thank you Freeman for your response. Just to be clear, I have a few
> follow-up
> questions. I am asking only because I want to understand it better as I am
> a
> newbie to osgi and karaf.
> * what is the purpose of osgi-refresh then? I know in the manual its says
> that it refreshes the bundle, but I thought it would clear the cache and
> reload the bundle. Also when I just type osgi:refresh without providing a
> bundle id, will it refresh the entire system?
> * if I use uninstall, it clears the cache. Then I do not need to use
> osgi:refresh, right?
>
> Once again, thank you for your time.
>
> Regards,
>
> Asha
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Clear-the-data-cache-for-Karaf-2-3-x-for-a-specific-bundle-tp4028037p4028054.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Clear the data cache for Karaf 2.3.x for a specific bundle

Posted by anair <as...@yahoo.com>.
Thank you Freeman for your response. Just to be clear, I have a few follow-up
questions. I am asking only because I want to understand it better as I am a
newbie to osgi and karaf.
* what is the purpose of osgi-refresh then? I know in the manual its says
that it refreshes the bundle, but I thought it would clear the cache and
reload the bundle. Also when I just type osgi:refresh without providing a
bundle id, will it refresh the entire system?
* if I use uninstall, it clears the cache. Then I do not need to use
osgi:refresh, right?

Once again, thank you for your time.

Regards,

Asha



--
View this message in context: http://karaf.922171.n3.nabble.com/Clear-the-data-cache-for-Karaf-2-3-x-for-a-specific-bundle-tp4028037p4028054.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Clear the data cache for Karaf 2.3.x for a specific bundle

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I'd say clear the cache means uninstall that bundle, so the uninstall is the way to go, can't understand why you don't wanna use uninstall
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2013-3-7, at 上午3:50, anair wrote:

> Hello,
> 
> I am looking at a requirement which requires me to clear only the karaf
> cache for a specific bundle. I know I can clear the entire cache using the
> 'clean' command on start-up. However, I want the cache for the specific
> bundle to be clear while karaf is running. I tried osgi:refresh <bundle_id>
> --force, but did not clear out the cache in the data folder. Is there a
> command to delete the cache for that specific bundle alone? uninstall and
> install command will delete and recreate the cache, however, I want to know
> if there is a way to clear the cache without uninstalling a bundle.
> 
> Thank you for your time. Any input is greatly appreciated.
> 
> Regards,
> 
> Asha
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Clear-the-data-cache-for-Karaf-2-3-x-for-a-specific-bundle-tp4028037.html
> Sent from the Karaf - User mailing list archive at Nabble.com.