Specifying Isolation:
For .ear files, in your jboss-app.xml, add the following descriptor fragment construct to enable scoped class loading:
<jboss-app>
<loader-repository>
com.example:archive=unique-archive-name
</loader-repository>
</jboss-app>
For .war files, in your jboss-web.xml, the following template applies:
<jboss-web>
<class-loading>
<loader-repository>com.example:archive=unique-archive-name</loader-repository>
</class-loading>
</jboss-web>