You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Julio Carlos Barrera Juez <ju...@i2cat.net> on 2014/05/21 10:19:15 UTC
complete OSGi bundle dependency tree
Hello.
I'm looking for a bundle or a tool that allows me to construct a complete
bundle dependency tree of my OSGi system. I'm aware of Karaf
command dev:show-tree [1] [2] [3], but I want something more general.
Instead of getting bundle dependency tree of one bundle I want to have it
for the entire platform, or al least I want to have the inverse command, it
is, having bundles depending on one specified bundle. Moreover I want to
use this information programmatically, not in a command or a graphical
representation.
I know I could develop it more or less
using org.osgi.framework.wiring.BundleWiring [4], but I want to know if
there is a bundle/tool doing this job now.
I'm aware of tools like Eclipse PDE Incubator Dependency Visualization [5]
and I'm working to "extract" core source code of it to use it.
Any help or guidance would be really appreciated.
Thank You.
Regards,
Julio.
[1] dev:show-tree in Karaf 2.2.x -
http://karaf.apache.org/manual/latest-2.2.x/commands/dev-show-tree.html
[2] dev:show-tree in Karaf 2.3.x -
http://karaf.apache.org/manual/latest-2.3.x/commands/dev-show-tree.html
[3] bundle:tree-show in Karaf 3.0.x -
http://karaf.apache.org/manual/latest/commands/bundle-tree-show.html
[4] org.osgi.framework.wiring.BundleWiring -
http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleWiring.html
[5] Eclipse PDE Incubator Dependency Visualization -
http://www.eclipse.org/pde/incubator/dependency-visualization/getsource.php
Julio C. Barrera Juez
Office phone: +34 93 357 99 27
Distributed Applications and Networks Area (DANA)
i2CAT Foundation, Barcelona, Spain
http://dana.i2cat.net
Re: complete OSGi bundle dependency tree
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
FYI, you can do quite the same with MBeans and Jolokia (directly).
EIK is also usable in Eclipse.
Programmatically, you can use the package/wiring service (it's what
show-tree does).
Regards
JB
On 06/13/2014 08:14 AM, Andreas Gies wrote:
> Hello,
>
> sorry for answering late, but the hawtio console has a plugin for
> visualizing bundle dependencies from a package and also a service
> perspective.
> These blog entries describe the plugin and also give you the pointers
> into the code. The hawtio rendering just uses the underlying REST interface
> provided by jolokia that is intalled with the hawtio feature. It should
> be straight forward to use the REST API for your purposes.
>
> [1]
> http://www.wayofquality.de/open%20source/hawtio/using-a-datafactory-in-hawtio/
> [2]
> http://www.wayofquality.de/open%20source/hawtio/creating-a-hwatio-directive/
>
> and of course
>
> [3] http://hawt.io/
>
> Hope that helps
> Andreas
>
>
>
> On 21/05/14 10:19, Julio Carlos Barrera Juez wrote:
>> Hello.
>>
>> I'm looking for a bundle or a tool that allows me to construct a
>> complete bundle dependency tree of my OSGi system. I'm aware of Karaf
>> command dev:show-tree [1] [2] [3], but I want something more general.
>> Instead of getting bundle dependency tree of one bundle I want to have
>> it for the entire platform, or al least I want to have the inverse
>> command, it is, having bundles depending on one specified bundle.
>> Moreover I want to use this information programmatically, not in a
>> command or a graphical representation.
>>
>> I know I could develop it more or less
>> using org.osgi.framework.wiring.BundleWiring [4], but I want to know
>> if there is a bundle/tool doing this job now.
>>
>> I'm aware of tools like Eclipse PDE Incubator Dependency Visualization
>> [5] and I'm working to "extract" core source code of it to use it.
>>
>> Any help or guidance would be really appreciated.
>>
>> Thank You.
>>
>> Regards,
>> Julio.
>>
>> [1] dev:show-tree in Karaf 2.2.x -
>> http://karaf.apache.org/manual/latest-2.2.x/commands/dev-show-tree.html
>> [2] dev:show-tree in Karaf 2.3.x -
>> http://karaf.apache.org/manual/latest-2.3.x/commands/dev-show-tree.html
>> [3] bundle:tree-show in Karaf 3.0.x -
>> http://karaf.apache.org/manual/latest/commands/bundle-tree-show.html
>> [4] org.osgi.framework.wiring.BundleWiring -
>> http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleWiring.html
>> [5] Eclipse PDE Incubator Dependency Visualization -
>> http://www.eclipse.org/pde/incubator/dependency-visualization/getsource.php
>>
>>
>> Julio C. Barrera Juez
>> Office phone: +34 93 357 99 27
>> Distributed Applications and Networks Area (DANA)
>> i2CAT Foundation, Barcelona, Spain
>> http://dana.i2cat.net <http://dana.i2cat.net/>
>
> --
>
>
> Andreas Gies
>
> WoQ – Way of Quality UG
>
> Geschäftsführer & CTO
>
> /eMail:/andreas@wayofquality.de <ma...@wayofquality.de>
>
> /Tel:/ +49 151 23470823
>
> /Fax:/ +49 1805 006534 2114
>
> /Twitter:/ andreasgies /Skype:/ giessonic
>
> /LinkedIn:/ <http://de.linkedin.com/pub/andreas-gies/0/594/aa5/>
> (http://de.linkedin.com/pub/andreas-gies/0/594/aa5/)
>
> /Xing:/ <http://www.xing.com/profile/Andreas_Gies>
> (http://www.xing.com/profile/Andreas_Gies)
>
> /Blog:/ <http://www.wayofquality.de/index.php/en/blog>
> (http://www.wayofquality.de/index.php/en/blog)
>
> /Github:/ <https://github.com/atooni> (https://github.com/atooni)
>
> /Amtsgericht Landshut:/HRB 8352//
>
> //
>
> /Ust.-Id.:/ DE274771254
>
>
> Haftungsausschluss
>
> Diese Email kann vertrauliche und/oder rechtlich geschützte
> Informationen enthalten und ist ausschließlich für den/die benannten
> Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Empfänger sein
> oder diese Email irrtümlich erhalten haben, ist es Ihnen nicht gestattet
> diese Mail oder einen Teil davon ohne unsere Erlaubnis zu verbreiten, zu
> kopieren, unbefugt weiterzuleiten oder zu behalten. Informieren Sie
> bitte sofort den Absender telefonisch oder per Email und löschen Sie
> diese Email und alle Kopien aus Ihrem System. Wir haften nicht für die
> Unversehrtheit von Emails, nachdem sie unseren Einflussbereich verlassen
> haben.
>
>
> Disclaimer
>
> This email may contain confidential and/or privileged information and is
> intended solely for the attention and use of the named addressee(s). If
> you are not the intended recipient, or a person responsible for
> delivering it to the intended recipient, you are not authorized to and
> must not disclose, copy, distribute, or retain this message or any part
> of it without our authority. Please contact the sender by call or reply
> email immediately and destroy all copies and the original message. We
> are not responsible for the integrity of emails after they have left our
> sphere of control.
>
> //
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: complete OSGi bundle dependency tree
Posted by Andreas Gies <an...@wayofquality.de>.
Hello,
sorry for answering late, but the hawtio console has a plugin for
visualizing bundle dependencies from a package and also a service
perspective.
These blog entries describe the plugin and also give you the pointers
into the code. The hawtio rendering just uses the underlying REST interface
provided by jolokia that is intalled with the hawtio feature. It should
be straight forward to use the REST API for your purposes.
[1]
http://www.wayofquality.de/open%20source/hawtio/using-a-datafactory-in-hawtio/
[2]
http://www.wayofquality.de/open%20source/hawtio/creating-a-hwatio-directive/
and of course
[3] http://hawt.io/
Hope that helps
Andreas
On 21/05/14 10:19, Julio Carlos Barrera Juez wrote:
> Hello.
>
> I'm looking for a bundle or a tool that allows me to construct a
> complete bundle dependency tree of my OSGi system. I'm aware of Karaf
> command dev:show-tree [1] [2] [3], but I want something more general.
> Instead of getting bundle dependency tree of one bundle I want to have
> it for the entire platform, or al least I want to have the inverse
> command, it is, having bundles depending on one specified bundle.
> Moreover I want to use this information programmatically, not in a
> command or a graphical representation.
>
> I know I could develop it more or less
> using org.osgi.framework.wiring.BundleWiring [4], but I want to know
> if there is a bundle/tool doing this job now.
>
> I'm aware of tools like Eclipse PDE Incubator Dependency Visualization
> [5] and I'm working to "extract" core source code of it to use it.
>
> Any help or guidance would be really appreciated.
>
> Thank You.
>
> Regards,
> Julio.
>
> [1] dev:show-tree in Karaf 2.2.x -
> http://karaf.apache.org/manual/latest-2.2.x/commands/dev-show-tree.html
> [2] dev:show-tree in Karaf 2.3.x -
> http://karaf.apache.org/manual/latest-2.3.x/commands/dev-show-tree.html
> [3] bundle:tree-show in Karaf 3.0.x -
> http://karaf.apache.org/manual/latest/commands/bundle-tree-show.html
> [4] org.osgi.framework.wiring.BundleWiring -
> http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleWiring.html
> [5] Eclipse PDE Incubator Dependency Visualization -
> http://www.eclipse.org/pde/incubator/dependency-visualization/getsource.php
>
>
> Julio C. Barrera Juez
> Office phone: +34 93 357 99 27
> Distributed Applications and Networks Area (DANA)
> i2CAT Foundation, Barcelona, Spain
> http://dana.i2cat.net <http://dana.i2cat.net/>
--
Andreas Gies
WoQ – Way of Quality UG
Geschäftsführer & CTO
/eMail:/andreas@wayofquality.de <ma...@wayofquality.de>
/Tel:/ +49 151 23470823
/Fax:/ +49 1805 006534 2114
/Twitter:/ andreasgies /Skype:/ giessonic
/LinkedIn:/ <http://de.linkedin.com/pub/andreas-gies/0/594/aa5/>
(http://de.linkedin.com/pub/andreas-gies/0/594/aa5/)
/Xing:/ <http://www.xing.com/profile/Andreas_Gies>
(http://www.xing.com/profile/Andreas_Gies)
/Blog:/ <http://www.wayofquality.de/index.php/en/blog>
(http://www.wayofquality.de/index.php/en/blog)
/Github:/ <https://github.com/atooni> (https://github.com/atooni)
/Amtsgericht Landshut:/HRB 8352//
//
/Ust.-Id.:/ DE274771254
Haftungsausschluss
Diese Email kann vertrauliche und/oder rechtlich geschützte
Informationen enthalten und ist ausschließlich für den/die benannten
Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Empfänger sein
oder diese Email irrtümlich erhalten haben, ist es Ihnen nicht gestattet
diese Mail oder einen Teil davon ohne unsere Erlaubnis zu verbreiten, zu
kopieren, unbefugt weiterzuleiten oder zu behalten. Informieren Sie
bitte sofort den Absender telefonisch oder per Email und löschen Sie
diese Email und alle Kopien aus Ihrem System. Wir haften nicht für die
Unversehrtheit von Emails, nachdem sie unseren Einflussbereich verlassen
haben.
Disclaimer
This email may contain confidential and/or privileged information and is
intended solely for the attention and use of the named addressee(s). If
you are not the intended recipient, or a person responsible for
delivering it to the intended recipient, you are not authorized to and
must not disclose, copy, distribute, or retain this message or any part
of it without our authority. Please contact the sender by call or reply
email immediately and destroy all copies and the original message. We
are not responsible for the integrity of emails after they have left our
sphere of control.
//