did you look at jboss modules API?
source can be found here https://github.com/jbossas/jboss-modules
some documentation can be found here https://docs.jboss.org/author/display/MODULES/Home
Basicly what you can do is load modules dynamicly and use its classloaders for the work you need.
But given description you provided, i would recomend you to write an AS extension as you will then have much more fine grained control of what is going on and how dependancies are are handled especaly if you dynamicly add deployments this could be done really simple by adding custom deployment processor and then reacting on some special deployments you have.
Sorry for bumping a old thread but this is exactly what I am trying to do without much success. I have created a AS extension for the framework and have a custom deployment processor in the freamwork extension which can detect plugin deployments. But I am at a loss on how to make the plugins classes available to the framework. I have searched for some examples on google and gone throuhg jboss modules API documents (http://docs.jboss.org/jbossmodules/latest/api/) but not really clear on how can I add a dependency from the framework to the plugin from the deployment processors deploy method.
I am very new to this and quite possibly missing something obvious. I would appreciate any help on this very much.