[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Testing Deployers with new Reflect + ClassPool

flavia.rainone@jboss.com do-not-reply at jboss.com
Fri Oct 16 06:32:24 EDT 2009


It will always be a mistery why the tests passed before (but I swear they did ;)

Yes, the classpools are never cleaned up, and this is generating the failures. This is a basic thing that I completely missed when doing the ClassPools. When I tested those against Branch5_x and JBoss AOP, they worked, but the point is that JBoss AOP has the mechanisms to clean the ClassPools. 

So, this is how JBoss AOP regiesters and unregisters ClassLoaders:
1. The AspectDeployer registers the ClassLoader when an aspect is deployed.
2. The AspectManager translator is is attached to the ClassLoaderSystem, which invokes the unregisterClassLoader everytime a unit is undeployed.

On our side of the story, the ClassLoader is registered on an as-needed basis, by RepositoryClassPoolFactory.getPoolForLoader(ClassLoader). I dunno it would be a good idea to create a translator just for the sake of unregistering classloaders. What would be a better approach? Maybe a LifecycleCallback?

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

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



More information about the jboss-dev-forums mailing list