Sylvain Wallez wrote:
There's a lot of existing code that uses
Thread.getContextClassLoader().loadClass() to dynamically load classes
instead of using Class.forName(). This is to solve the common problem
in app servers where such classes would be in the server's classloader
(e.g. the "shared" directory in Tomcat [1]) and would load classes
defined by the webapp classloader of the currently executing request.
How will such code behave in an OSGi container? My (random) thought
was about this.
Hope I made it clearer :-)
Okay, I understand. You are talking about bundlizing code that uses the
context class loader. Yes, in that case, if that code is contained
inside the bundle, then that might work.
I thought you were talking about a host application that contained a
framework instance and was trying to interact with it.
-> richard