permaculture playing cards*
The moose likes EJB and other Java EE Technologies and the fly likes Is a standalone war file treated as part of a Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Is a standalone war file treated as part of a "master" web-app?" Watch "Is a standalone war file treated as part of a "master" web-app?" New topic
Author

Is a standalone war file treated as part of a "master" web-app?

Yuriy Zilbergleyt
Ranch Hand

Joined: Dec 13, 2004
Posts: 429
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?

Thank you in advance,
Yuriy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is a standalone war file treated as part of a "master" web-app?