My situation is the following: I want to deploy a special MXBean using a SAR archive. This should be easy, right?
Right, unless the bean references classes from an external library. When this happens, I found no way of telling JBoss to add to the classpath those external libraries that I'm packaging along with my bean in the SAR archive.
Until now I have tried the following:
1. Simply add the libraries in the root of the archive.
2. Modify the Class-Path manifest entry to add the library name there
3. Added a jboss-structure.xml (copied from one of jboss5's sar archives from the /deploy dir)
4. Looked into jboss-deployment-structure.xml but really found no connection to what I am trying to do.
Whatever I tried I just couldn't convince JBoss to load the classes I'm referencing in my bean from the libraries packaged as jars inside the sar archive.
Any clues?