Thank you for replying, Actually, I can't export the foreign object, because it is a core component of the other framework that I have integrating with OSGi. This component is loaded by a specific classloader created on its environment. It is not accessible by the OSGi classLoaders. 2009/1/19 Niclas Hedhman <[email protected]>
> On Mon, Jan 19, 2009 at 2:40 PM, Nairon Viana <[email protected]> > wrote: > > > > Hello, > > > > I'm trying to integrate the OSGi framework with other java-based > platform. > > Among the many problems I have encountered, there is one in particular: I > > need to access an OSGi service using a non-bundle component. Somebody > knows > > any way for performing this without disagreeing with the specification? > > You have several ways to do this; > > * Let the foreign component sit on the classpath, and have the > Framework bundle export the packages needed. > > * Most non-bundles can be bundlized easily. > > * Each framework allows for embedded operation and letting the outside > world become part of the OSGi world so to speak. I have personally > only worked with Felix in this, and there you basically implement an > Activator and it is passed as an argument when you shoot up Felix. > Felix will then pass you the BundleContext as if you were inside the > OSGi world, and you can then either provide or consume services. > > * There is a "last resort" called bootclasspath delegation, where the > classloader will look in the parent classloader (i.e. System CL) for > one or more packages, before using the module layer in OSGi. I > recommend against this, and try the export via the framework first. > > > Cheers > Niclas > > > > -- > http://www.qi4j.org - New Energy for Java > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev > -- Regards, Nairon Saraiva Viana University of Amazonas Manaus - Amazonas - Brasil +55 92 3647-4471
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
