Now I think the question is: how can I define classloading isolation in application.ear on a per-library basis. So that I can isolate the Seam libraries and stuff, but not the EJB's. This would resolve this situation, am I right?
I should be doable, yes.
Let me think about this, and get back to you.
There is a excludedExportPackages string and excludedExport filter on ClassLoadingMetaData -- class representation of jboss-classloading.xml.
As you can deduct from the name, it's unfortunately just the other way around as we need it, it lists excludes instead of includes.
Unless you can somehow list all excludes (all, but that mbean' package name),
you will need to hack this thing programmatically (otherwise you could use jboss-classloading.xml),
meaning you will have to implement a deployer which creates proper ClassLoadingMetaData instance,
and attaches it to App.ear' DeploymentUnit instance.