Hi Richard Thanks for the reply. Right , the moduleClassloaderBut how does the jvm know which classloader to pick ??There are a number of bundles and so a number of modules Is there some tricks inside ?
> Date: Thu, 6 Aug 2009 10:03:43 -0400 > From: [email protected] > To: [email protected] > Subject: Re: A questions about the classloading mechanism in Felix > > When a bundle loads a class it does NOT go through > Bundle.loadClass()...this is only if outside code wants to load a class > from a bundle. When a bundle loads a class, it is loaded from its own > class loader (called ModuleClassLoader in trunk). The call to this class > loader's loadClass() method is done automatically by the JVM as needed. > > -> richard > > On 8/5/09 22:27, MichaelMichael wrote: > > Hi all > > I studying classloading's in felix.I have made many search but there is > > still one thing I don't understand . > > The question :(correct if I am wrong )As we know a "new" will invoke a > > java.lang.classloader.load class normally.In felix , after the > > frameword(Felix) started , a "new ClassType()"(take the ClassType be a > > class could be found by the bundle ) will invoke the loadclass of > > Bundle.loadclass .I am always wandering how could this happens .I followed > > the source code , and also also tried the thread.setcontextclassloader,all > > failed .Recently I found that this should replace the systemclassloader ,is > > this correct ?But how to replace it after the launching of Felix ? > > Could anyone please explain this to me ? > > Thanks a billion !!! > > > > RegardsMichael > > _________________________________________________________________ > > 您可以借助 Windows Live 整理、编辑和共享您的照片。 > > http://www.microsoft.com/china/windows/windowslive/products/photo-gallery-edit.aspx > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > _________________________________________________________________ 上Windows Live 中国首页,下载最新版Messenger! http://www.windowslive.cn

