Thanks for your fast comment Richard! And, yes I am sure it is resolved.
In fact, executing in gogo
inspect requirement osgi.wiring.package <myBundle's id>
lists the bundles I expected the method call would return.

I have a bundle myBundle that requires a few others, then my test steps are:
From gogo:
deploy and start (using OBR) myBundle(it and its dependencies get "active")
     stop myBundle(it goes to state "resolved")
install my test bundle (testBundle) that executes the code from my original mail
     start testBundle

And it prints the collection returned by getDependencyClosure that only contains myBundle. I would be happy to give you any other information you need to help me understand what is going wrong.

Kind regards

On 10/05/12 20:25, Richard S. Hall wrote:
Should work. Are you sure your bundle is resolved?

-> richard

On 5/10/12 19:19 , Matias SM wrote:
Hi everybody,
I'm trying to get a bundle's dependency closure by using the method getDependencyClosure. However if I do sth like: context.getBundle(0).adapt(FrameworkWiring.class).getDependencyClosure(Arrays.asList(myBundle)); to get myBundle's closure, all this call is returning is the bundle (myBundle) itself.

From getDependencyClosure javadoc:
/Returns the dependency closure for the specified bundles.
A graph of bundles is computed starting with the specified bundles. The graph is expanded by adding any bundle that is either wired to a package that is currently exported by a bundle in the graph or requires a bundle in the graph. The graph is fully constructed when there is no bundle outside the graph that is wired to a bundle in the graph. The graph may contain UNINSTALLED bundles that are removal pending./

I understand that the result of the previously cited call should be all the bundles wired (by a requirement or a capability) to myBundle.
What am I doing wrong?

And I would like to ask you also if there is a way of getting only the closure formed by the bundles wired to myBundle by its requirements (i.e. only get those bundles that are needed to resolve myBundle).

Thanks in advance for any help you can kindly give me
Kind regards


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Reply via email to