You can't use a thread local because 

1) the deployers/micrcontainer can cause other deployments/contexts to be 
processed
when dependencies are satisfied. e.g. deploying the transaction manager will 
cause
many other other services to start.

2) Outside the deployment framework callbacks there will be no "current 
deployment"

Also Classes don't necessarily belong to any deployment unit,
e.g. the bootstrap classes

I'd suggest the easiest way to implement this feature would be write a new 
deployer
that runs "post classlaoder". This would mainatain a map of
ClassLoader->DeploymentUnit
for any DeploymentUnit (including subdeployments like wars) that have a Module
attachment and hence their own classloader.

You can then use this map in whatever you want to do.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236057
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to