On Tue, 24 Apr 2012 15:53:32 +0200, Hervé BARRAULT wrote: Not really a Karaf problem, but whatever..
> I have a case where i can't see how to cleanly list the imported packages > without using DynamicImport-Package. It is always possible. It's software. > I have a bundle B which defines a "container" library (basically a > container can support any Serializable and provides > serialization/deserialization tools). This is the (typical) problem. The solution is to fix the code. :) You can: 1) fix your B API to take a classloader as argument, so that C can pass its own Classloader in; this should work since it is wired to import A. or 2) register & expose the API in B as ServiceFactory (!) and return a per-caller customized service with the calling bundle's classloader used for classloading. Then B will also work for client bundles D..Z :) Both ways are easy to do, reliable, work well and don't require DynamicImport. -h
