I converted our client app to run as a JBoss service. I seems to be having problems loading classes from the correct jar file. Here's how our client used to work before.
1. All the code is in a jar file. Lets say it called as base-code.jar. This jar file is appended to the classpath that is passed to java.exe.
2. Whenever we have fixes, we create something called as a fixes.jar. If we have multiple fixes, we might have something like fixes-0.jar, fixes-1.jar and so on. This naming scheme was done to ensure that classes in fixes-0.jar are loaded first and then those in fixes-1.jar. This ensures that a newer version of a class is loaded first even if it exits in other fixes jar files. During the startup of our application, we append these jar files in order before we append the base-code.jar file.
3. Now that our application has been converted to a MBean service, I copied all these files into \lib directory and specified this directory as the codebase in jboss-service.xml.
My problem is how do I ensure that Jboss loads the classes in the correct order? I seems to be having weired problems. I even setup multiple codebases in jboss-service.xml hoping that JBoss would add the jar files in the order that I specified. But, I don't think that it did so. IS there anyway that I can force the order?