In JBoss EAP 6.1, there is a file
JBOSS/bin/client/jboss-client.jar
It contains all the client classes needed by web applications. However, when we install a WAR file, it is not seeing these classes available to it.
To work around this, we have been including a copy of this JAR in the war files WEB-INF/lib
folder. These copies are a waste, but more importantly it means we have to have a different WAR file for every app server we want to install into.
Is there a trick to allow the applications in the WAR files to load and use the classes from this library where it is, without having to copy it into the WEB-INF/lib
folder of the application? Alternately, is there a place we can copy this jar so that it would be available to all WAR applications?
The solution was to place a file named
jboss-deployment-structure.xml
in the WEB-INF folder. The contents of that file was:This allowed us to use the JMS classes from JBoss without having a copy of the client library included with the application being installed. It seems that some time ago, a programmer ported the application to JBoss, and ran into a problem which was "solved" (hacked) by putting the client library in, but this is a far better solution.