I must admit, I've read a lot of the documentation (including the three class loader articles on the wiki), and some other forum posts, and I still don't get it.
The goal is the following:
1) Use our own copy of any utility JAR's we choose to deploy (STaX, for example, or Apache Axis).
2) Use the JBoss copy of any utility JAR's that we don't deploy (Xerces, for example).
3) Have both a "production" and a "development" version of our product running in the same JBoss instance.
We deploy our app as an EAR file containing utility JAR's and a single WAR. To make everything work correctly, I've added the following jboss-app.xml file:
<jboss-app> <loader-repository> www.foo.com:loader=foo-demo.ear <loader-repository-config> java2ParentDelegation=true </loader-repository-config> </loader-repository> </jboss-app>