The one issue is that this is a management api.
So we need a way to identify the policy. Currently each policy has a "name"
but that's just for debugging purposes. In the deployment layer we
use the top level deployment name.
The domains do have a unique name.
Assuming the name is enough, I can see it being fairly trivial to implement
a management api like the following on the ClassLoaderSystem:
Assume similar api for getResources()
| // Basic lists
| Collection<ClassLoaderDomain> listDomains();
| Collection<ClassLoaderPolicy> listPolicies();
| Collection<ClassLoaderPolicy> listPolicies(String domainName);
|
| // Your point 2 - class exported in a domain
| Class showClass(String domainName, String className);
| ClassLoaderPolicy findClassPolicy(String domainName, String className);
|
| // Your point 1 - class exported by a policy
| Class showExportedClass(String policyName, String className);
| // Class maybe private (not exported)
| Class showLocalClass(String policyName, String className);
| // Class located using normal rules
| Class findVisibleClass(String policyName, String className);
| ClassLoaderPolicy findVisibleClassPolicy(String policyName, String className);
|
One issue with the showLocalClass and showExportedClass
is that the policy may not actually use it, if it is in one of its imports
the imports hide the class (like the uses constraint in OSGi).
I also imagine we can show things like some package queries as well.
Like listing who exports what package and what they are searched for
exportAll.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123621#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...