Is a standalone war file treated as part of a "master" web-app?
posted 11 years ago
In Jboss I have an ejb jar and an application war deployed straight in the deployment directory without an ear to contain them. I noticed that if the war and jar use different versions of the same classes, the war disregards the classes in it's own WEB-INF/classes directory and starts using the ones of the jar. If the jar is redeployed with a yet different version, the war keeps using the jar's previous classes. Once the war is redeployed, it synchs up with the jar again. The only way to make the war use it's own files seems to be to remove the jar's classes and redeploy the war.
Is this because without an ear file the two are treated as a part of the same master app somehow?
Previously I noticed that if I have two wars using the same classes, the war deployed later will use the classes of the older one if the classes are located outside of the WEB-INF directory. Moving them to WEB-INF/classes fixed that problem. However, as I can't move the jar's classes to its META-INF, is there any way to solve this without switching to the ear format? And would the ear format even help at all?