I've solved this myself, so I'll post the solution here that might be of interest to others. Another issue I had is that I need one application context configuration to work under both JBoss and 10gAS.
Using the MBeanServerFactoryBean with locateExistingServerIfPossible set to true solves the MBeanServer instantiation issue (but still works on JBoss).
To get around the domain security problem, register beans with no domain (it will then use the default domain). For example, I have defined "jmx.domain" in an external property file. For JBoss, this needs to be set to something descriptive and unique. For 10gAS, this setting needs to be blank.
My application context looks like:
Code:
<bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true"/>
</bean>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="server" ref="mbeanserver"/>
<property name="beans">
<map>
<entry key="${jmx.domain}:name=Monitoring" value-ref="monitoring"/>
<entry key="${jmx.domain}:name=Caching" value-ref="caching"/>
<entry key="${jmx.domain}:name=Configuration" value-ref="configuration"/>
</map>
</property>
</bean>
I can confirm this works under JBoss 4.0.4 and Oracle 10g R3 AS (10.1.3.0.0)