Back on topic.
So what is missing?
1) Policy
This ClassLoader is very dumb. It relies on you to tell it what the policy is.
The only current implementation of a policy is in the tests
https://svn.jboss.org/repos/jbossas/projects/microcontainer/trunk/classlo...
There are actually two more levels that need to be implemented.
a) VFS layer - write a policy that uses the VFS
b) Dependency and policy construction controller - i.e. from metadata workout
when dependencies are satisifed and create the relevant policies.
This will actually be part of the [Main]Deployer(s) when I plugin the MC to it.
2) Security
The current tests don't run with a security manager enabled, but also I need
to audit the classloader for two things:
a) Where privileged blocks are needed
b) What permissions we need to define, e.g. who can register policies or create domains
3) Caching/BlackListing
There is currenty no caching or black listing (cache misses).
This is going to be a little more complicated to implement since you can't
use a global cache for OSGi. It is no longer the "big ball mud" model.
The type and whether to cache should be part of the Policy.
4) Translater
I added a hook for translating classes, but I'm probably going to remove it
since this is already handled from Java5+ by the agents api in the JDK.
5) TODOs
There are a number of other TODOs and REVIEWs in the code, but these
are fairly minor.
6) Tests
I have some basic tests and I've ported some of the old classloader
tests from the jboss testsuite (where they didn't try to hook into the UCL).
Obviously more are needed. e.g. I have no tests at all for the domain
hierarchy.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041349#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...