This kind of problem indicates that CL is not the right key to map things against.
OK, you definitely need some CL mapping,
as that's what is available from plain / non-deployment code.
But you should make it in such way that you can do proper cleanup with Module only.
e.g.
With register code you create hierarchy with Module's help, but also apply proper CL
mappings.
Where you somehow tie those CL mappings with Module.
(perhaps a simple WeakHashMap by CL key is enough here)
But the real cleanup code is done by Module mapping.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265305#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...