[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Adding to the framework exported libraries?

Hi, i'm using EclipseStarter to start and integrate the Equinox OSGi Platform in a launching application. I want my launching application to be able to expose some services and/or libraries to bundles that run within the embedded OSGi environment. However i'm having a hard time figuring out how to define this. This may not be conventional, but it would be very useful for my application.

As an example, my launcher loads some configuration data and uses that to determine how to launch Equinox, however i want to also expose the configuraiton data to my bundles, as a service. As well, the classes that i use in the launcher that load the configuration are reusable and i want to expose them as an exported library for my bundles to import and use to load other configuration data.

In short, what i would want to do is simply reference the OSGi object/context and call something like osgi.export( "com.acme.foo", "1.0.0" ). I know that the classes are available because they are in my launcher and i have started eclipse with my classloader as the parent, so it is just a matter of making the OSGi bundle loader/validation step recognize that there are more packages exported then just those that come with Equinox itself.

Does this make any sense? I can try to describe this another way if it would help.

Is there any way to do this? I've looked a bit at the framework extensions, but they don't seem to provide what i'm looking for, because i need to pass to the OSGi platform some information, and let it pick up the classes from the parent classloader, rather then giving it a ready bundle to use.

Thanks for your help.