I have two MBeans: MBeanA and MBeanB (MBeanA depends on MBeanB).
MBeanA's classes are loaded from JARs in the <server config>/lib directory, but because the timing of its deployment is important, it is actually listed in <server config>/conf/jboss-service.xml.
MBeanB's classes are loaded from a scoped SAR. This is all well and good except that MBeanB is needed by MBeanA. I could use MBean dependencies to get this to work out except that would cause MBeanA's start method to execute much too late.
Is there a way I can deploy a scoped MBean from <server config>/conf/jboss-service.xml? I have considered setting up another deployment scanner that would load before the deploy directory's scanner, but I am not sure that this will accomplish what I really want: MBeanA (and therefore MBeanB) must deploy extremely early in the startup process.
This is weird.
Maybe try a scanner (with dynamic scanning disabled) early in the conf/jboss-service.xml descriptor pointing to ./deploy2/, and put in there your [scoped] services + dependencies.