I agree with you, the way the class loader is implemented in JBoss causes some headache. This link explains it:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ has caused me some problem and I have not been able to create multiple repositorys in jboss-app.xml , or atleast not seen any result of trying to do so.
My only solution has been to run multiple instances of JBoss.
Thanks for the answer, I appreciate the help. The pointed forum post is actually very useful and explain a lot of things in the current behavior that I have. It sounds weird this new chnage, I have the impression that it is not very J2EE like, but I might be wrong. I always thought that separate applications deployed within the same J2EE container are really well separated and nothing can be shared.