|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Having access to all exported class from frameworkHello 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? Thanks a lot in advance. Marc-Andre |
|
|
Re: Having access to all exported class from frameworkMarc-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? > 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 cziegeler@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Having access to all exported class from frameworkThe website does not look like it refer to the common classloader.... (
http://sling.apache.org/site/bundles.html) Did I look at the right place for that? From what you seems to tell me, there is not much other possibility than to use the dynamic-import if I don't use a specific classloader that is resolving information in the OSGi context. Thanks for the answer. I would be interested to see how this classloader is working and resolving the issue. Marc-Andre On Wed, Oct 14, 2009 at 11:30 AM, Carsten Ziegeler <cziegeler@...>wrote: > 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 > cziegeler@... > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > |
| Free embeddable forum powered by Nabble | Forum Help |