By ignoring the advice to use a .sar file, I've added code to my main application that programmatically registers the MBean. And if using Spring this code can be replaced by some very simple configuration instead.
// get the JBoss JMX MBean Server MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0); // register custom MBean MonitoringMBean bean = new Monitoring(); server.registerMBean(bean, new ObjectName("test:name=Monitoring"));
This is a much simpler solution, and needs no classloading configuration at all...
Perfect, just what I was looking for!