Marc-Andre Houle wrote:
> Hello all,
> 
> I'm using felix as my OSGi framework to make my already created application
> modular.  Basically, we are using the OSGi system to plugin in module at
> boot and make them available to the UI. We are using wicket as our web
> framework. To load the felix system, I'm using the 4.2 generic method of
> OSGi to get a FrameworkFactory and then a framework instance.
> 
> Since the Wicket is actively using the class searching mechanism instead of
> using class forname directly, it is possible for my to also search into the
> OSGi system. Presently, I implemented a bundle with a manifest containing a
> Dynamic import statement on * in order to give access to all class to the
> wicket framework.  For me, it would be greatly easier to take the system
> bundle (the framework instance) and ask it to resolve in the exportable
> package of the system.
> Is there a way to configure the framework to work like the dynamic import
> statement?  Since there is no real manifest, how can I specify this?
> 
In Apache Sling we have a similar issue: we support scripting and these
scripts in the first place run outside of an OSGi context. But as you
may want to access all available exported classes, we created a special
class loader for this. This class loader uses the package admin for
loading classes.

Apache Sling has a bundle, the commons classloader (just released as
version 1.0.0) which has no dependencies to Sling and provides a service
which gives you this dynamic class loader. Under the covers this class
loader also handles bundle updates, installs, uninstalls.

Before we had the class loader we used dynamic import * as well :)

Carsten

-- 
Carsten Ziegeler
[email protected]

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

Reply via email to