Do we have somewhere description of constructions which may be used in
aliases? We definitely should put this into documentation.

Best regards,
Lukasz

-----Original Message-----
From: Guillaume Nodet [mailto:[email protected]] 
Sent: Wednesday, December 08, 2010 10:41 PM
To: [email protected]
Subject: Re: Inspecting referenced services for a bundle...

Not directly, but if you iterate through those ServiceReference, you
could build such a list.
You can easily create such a function using the following:

r...@karaf> bundlesProvidingServices = { services = ($.context .
getBundle $1) . servicesInUse ; bundles = new java.util.LinkedHashSet
; each $services { $bundles . add ($it . bundle)  } ; $bundles }

and then use it:

r...@karaf> bundlesProvidingServices 46
   46|Active     |   60|org.ops4j.pax.web.pax-web-runtime (0.8.1)
   56|Active     |   60|org.apache.felix.webconsole (3.1.6)

the output is actually a list of bundles that you can also store in a
variable if you want more infos.
Note that the syntax is for 2.2-SNAPSHOT and it may have sligtly
changed from 2.1.x.  If that's the case, let me know i can help you
port it if you want.

On Wed, Dec 8, 2010 at 22:17, Brad Beck <[email protected]> wrote:
> Is there a way (using the karaf shell) to inspect a bundle (e.g. 123) to
determine which other bundles are providing services to it?
>
> "bundle 123" shows ServicesInUse, but it doesn't list the bundles
providing the services.
>
> Thanks,
> -Brad
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to