Skip to main content

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

Hi Tom, thanks for the suggestion. Only reason i don't think this will work (and maybe i'm wrong?) is that i need my host application to expose instances (services) to the bundles, so for example my host application creates in instance of FooService, and then registers it with the root BundleContext of the Equinox framework. However, unless i somehow tell Equinox that the package is available from the host (parent classloader) it won't let any bundle load that depends on this package. So far i'm not seeing how Fragment Bundles can solve this problem, because they seem like they need to be full bundles and not just passed in, but there could be some API or technique i'm not familiar with?

....
Kabe

On 2/10/07, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:

Another option is to install a fragment to system.bundle to export the packages from the system.bundle.  This has the advantage of not overriding the other packages exported by the system.bundle from the vm execution environment.

Tom



BJ Hargrave/Austin/IBM@IBMUS
Sent by: equinox-dev-bounces@xxxxxxxxxxx

02/09/2007 06:54 PM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx >
cc

Subject
Re: [equinox-dev] Adding to the framework exported libraries?







Set the system property org.osgi.framework.system.packages to
"com.acme.foo;version=1.0.0" before launching Equinox. Then Equinox will
export that package from the system bundle and other bundles can wire to
it. The system bundles is the framework and the framework's classloader
will be used to provide that package.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@xxxxxxxxxx

office: +1 386 848 3788
mobile: +1 386 848 3788




Kabe <kabriel@xxxxxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx
02/09/2007 07:20 PM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
equinox-dev@xxxxxxxxxxx
cc

Subject
[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.

....
Kabe_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top