You can try configuring the servlet server to not follow Java 2 classloading compliance.
In jbossweb-jetty.sar/META-INF/jboss-service.xml or jbossweb-tomcat.sar/META-INF/jboss-service.xml, you can set this by:
The config file has plenty of comments to explain what this means. It might work for you.
It seems I found the solution myself. In the chapter on the JMX microkernel of the JBoss documentation it is explained how classes can be scoped through the jboss-app.xml descriptor.
I haven't tried it yet, but it seems that this will solve my problem.