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/06/04 02:16:50 UTC

Keep track of features installed in karaf 2.2.9

Hello,

Is it possible to know which features were installed in karaf 2.2.9 once the
container is up and running. The feature can be installed using obr:deploy
or features:install. I am already listening to the bundles being installed
by implementing SynchronousBundleListener. However, now I need to know which
features they belong to. I just need the feature name, basically when user
does 'obr:deploy -s feature-name', I need the feature-name. My current
implementation gives me only the list of bundles that get installed when the
feature itself is installed.

Any pointers are greatly appreciated.

regards,

Asha



--
View this message in context: http://karaf.922171.n3.nabble.com/Keep-track-of-features-installed-in-karaf-2-2-9-tp4028938.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Keep track of features installed in karaf 2.2.9

Posted by Freeman Fang <fr...@gmail.com>.
Yes, grasp and inject FeaturesService into your bundle, and you can use it in your bundle to list features, etc.
 blueprint configuration like 
<reference id="featuresService" interface="org.apache.karaf.features.FeaturesService" />
then you can use featuresService in your bundles.

Take a look at [1] to get more details about what you can do with FeaturesService

[1]https://svn.apache.org/repos/asf/karaf/branches/karaf-2.3.x/features/core/src/main/java/org/apache/karaf/features/FeaturesService.java
-------------
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小屋

www.camelone.org : The open source integration conference: 

On 2013-6-4, at 上午9:36, anair wrote:

> Sorry, I meant programatically, not via  the karaf console. Just as we can
> implement SynchronousBundleListener to listen to any bundle change events,
> is there a way to do the same for the features? I just need the feature
> name.
> 
> thanks,
> 
> Asha
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Keep-track-of-features-installed-in-karaf-2-2-9-tp4028938p4028941.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Keep track of features installed in karaf 2.2.9

Posted by anair <as...@yahoo.com>.
Sorry, I meant programatically, not via  the karaf console. Just as we can
implement SynchronousBundleListener to listen to any bundle change events,
is there a way to do the same for the features? I just need the feature
name.

thanks,

Asha



--
View this message in context: http://karaf.922171.n3.nabble.com/Keep-track-of-features-installed-in-karaf-2-2-9-tp4028938p4028941.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Keep track of features installed in karaf 2.2.9

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

Does 

features:list
work for you?
-------------
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小屋

www.camelone.org : The open source integration conference: 

On 2013-6-4, at 上午8:16, anair wrote:

> Hello,
> 
> Is it possible to know which features were installed in karaf 2.2.9 once the
> container is up and running. The feature can be installed using obr:deploy
> or features:install. I am already listening to the bundles being installed
> by implementing SynchronousBundleListener. However, now I need to know which
> features they belong to. I just need the feature name, basically when user
> does 'obr:deploy -s feature-name', I need the feature-name. My current
> implementation gives me only the list of bundles that get installed when the
> feature itself is installed.
> 
> Any pointers are greatly appreciated.
> 
> regards,
> 
> Asha
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Keep-track-of-features-installed-in-karaf-2-2-9-tp4028938.html
> Sent from the Karaf - User mailing list archive at Nabble.com.