I have been learning the class isolation and scoping in jboss 3.2.7. I have repeatedly reviewed the WIki articles ClassLoading configuration and ClassLoading Use Cases. I have searched the forums for classloading and I have worked with classloading in the app I am writing.
I can get the ears to scope and isolate the classloading but there are still a few things I am fuzzy about.
Here is my issue. I have several ears in one instance of jboss. The ears all have there own property file the defines some properties specific to each ear. The property file is named the same in each ear. Obviously with no scoping/isolation this causes a problem, one gets loaded and all the other ears use that first instance. When I scope the ears it still does the same thing. I have to scope/isolate the ears for them to see their own properties file. But isolation seems to cause various ClassCastExceptions and I have had to pull many of the server/x/lib files and jbossweb-tomcat50.sar files into the ears.
1) When I scope and isolate an ear the contains ejb jars and wars I seem to have to put some of the server lib jars and the jbossweb-tomcat50.sar jars into the ear. Is this correct? Are there specific jars that I must move into the ear?
2) When I scope/isolate one ear in a jboss instance it seems I must scope/isolate all ears or I start getting ClassCastExceptions when running my apps. Must I scope/isolate all ears in an instance or is this an issue with what jars I have in the scoped/isolated ear?
3) Assuming I have multiple ears in a jboss instance and I just scope all the ears (no isolation). From the Classloading use cases (Use Case #4) it seems if ear #2 loads a class before ear #1, ear #1 will use that class even though the same class exists in ear #1's package map. Is this true?
4) If question #3 is true, is it possible to make it so that an ear will check its class cache, then checks its own package map, then proceed to the other ear classloaders?
5) Is it possible to configue classloading so the the ear will check is class cache, then its own package map, the goes to the server/x/lib repository?