From discussions on the dev-list this should be
fully supported by 3.2 final at the moment the top
level must be an ear.
Here's an example from the testsuite for a sar inside an
ear with a loader-repository.
Is it there for the SAR in 3.2.0RC2??????
A similar question:
I have two SARs providing the same type of service but using two different database backends, and different versions of some classes.
I would like to deploy two WARs to provide a front-end for each one of these services. the WARs containing the respective versioned classes for the service it is associated with.
APP A: SAR A (contains JAR X) <--> WAR A (contains JAR X)
APP B: SAR B (contains JAR Z) <--> WAR B (contains JAR Z)
What is the best way to deploy this in a single instance of JBoss?
Now, I am somewhat familiar with the CL structure in JBoss, so I know why I get a ClassCastException when I deploy just APP A with SAR A and WAR A in separate EARs with <load-repository> set for each... it is trying to load the "local" version of the JAR's classes in the Webapp, thus throwing the CCE. I fixed this by putting JAR A in deploy/ and removing it from the SAR/WAR files. This, of course, means that there's no point in using the <load-repository> as now my JAR A is on the UCL.
So... is it possible to fetch an _object_ that has been created in one CL from another CL containing the same _class_? In other words, is it possible to have the same JAR, in two separate loader-repositories (CL's), and the object can be fetched across the CL's without throwing a ClassCastException? I am using a MBeanServer.getAttribute() to get a handle on the object in SAR A.....
Should work when you deploy Jar A only once in the scope of application A. So only in the SAR or EAR, not in WAR.
Jar A will be found in WAR A through scoped repository.
Same for App B