Thanks Richard: Sorry, forgive me; I mis-read your reply as my pool English; Bundle.loadClass() is enough for spring-dm
> -----original ----- > > > Thanks Richard > > It seems there is no way to do this in a normal ways; :( > But I still feel confuse why the other extender do such a familiar function > based on felix. (etc: spring-dm and war extender will also initialize object > by application bundle's class). > > Does anyone know about this? > > > > ------------------------ > > Sender: Richard S. Hall [mailto:[email protected]] > > Date: 2011/6/2 12:10 > > Receiver: [email protected] > > Subject: Re: How to find a bundle's classloader in a extender ? > > > > > > > > On 06/01/2011 11:37 PM, ext2 wrote: > > > Hi: > > > I am writing a extender program which will listen the bundle start > > > event; and each bundle will contains a configuration file which describe > > > some java class of bundle to be launched; > > > But when the extender received the bundle start event. Then I have > > > no idea about how to get the bundle's class loader to loading class by > name; > > > I check the osgi-specification and haven't find the API to got class > > > loader from bundle or bundleContext; > > > Doest anyone know something about this ? > > > > If you just want to load a class from a bundle, you can use > > Bundle.loadClass()...in the R4.3 spec there is a way to get the actual > > class loader, but Felix doesn't yet support R4.3... > > > > -> richard > > > > > thanks for any suggestion > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

