[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Class loading debugging

adrian@jboss.org do-not-reply at jboss.com
Fri Jan 25 12:43:01 EST 2008


"scott.stark at jboss.org" wrote : I'd like to get a better view of what has visibility to a class from the system/domain level. What I would like is:
  | 
  | 1. Be able to ask a policy, what policies have a resource/class
  | 

You mean locally. That's two different questions depending on whether
it exports those resources/classes.
I also assume you mean a domain or the classloading system?

There's a different question as to whether it can see it from one of its imports
or the domain if it is importAll. But that's just the standard classloading api.

anonymous wrote : 
  | 2. Be able to ask the BaseClassLoaderSystem what domains have a resource/class
  | 

That pretty much already exists, but it will only be exported classes and resources.
The only part that is missing is the ability to list the domains so you can iterate over
them and do loadClass/getResource.

anonymous wrote : 
  | 3. What are the classpath elements that are visible starting from a ClassLoader. Sort of a URLClassLoader.toURLs() view.
  | 

There's no such thing in general. If the policy is a VFSClassLoaderPolicy
then you can ask what its VFS roots are and you could ask what other policies
it can see that are VFSClassLoaderPolicys or URLClassLoaders.
But the new classloading system has been designed to be flexible.
There's no direct dependency of URLs/VFS etc. Somebody can implement
a policy how they want.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123613#4123613

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123613



More information about the jboss-dev-forums mailing list