Andreas Senft
Dec 12th, 2007, 12:54 AM
Hi all,
I am currently trying to expose an MBean in WebLogic 9's MBean server.
First of all, using the simple approach works:
<context:mbean-export default-domain="${service.domain}"/>
However, I want to change the strategy for handling an existing instance. As the above mentioned tag just expands to an AnnotationMBeanExporter I tried this:
<bean class="org.springframework.jmx.export.annotation.Annotati onMBeanExporter"
p:registration-behavior-name="REGISTRATION_REPLACE_EXISTING"
p:autodetect-mode-name="AUTODETECT_ASSEMBLER"
p:default-domain="${service.domain}"
/>
Though, here things do not work as expected. It looks to me, as if publication does happen in another MBean-server and not the existing one.
Also this doesn't help:
<bean class="org.springframework.jmx.export.annotation.Annotati onMBeanExporter"
p:registration-behavior-name="REGISTRATION_REPLACE_EXISTING"
p:autodetect-mode-name="AUTODETECT_ASSEMBLER"
p:default-domain="${service.domain}"
p:server-ref="mbeanServer"
/>
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactory Bean"
p:locate-existing-server-if-possible="true"
/>
I saw that in MBeanExportBeanDefinitionParser there is an invocation of MBeanServerBeanDefinitionParser.findServerForSpeci alEnvironment() which seems to make the difference. Now my question is, how do I have to configure things, so that the WebLogic MBean server is used?
BTW: Some more configuration properties in context:mbean-export might be helpful.
Regards,
Andreas
I am currently trying to expose an MBean in WebLogic 9's MBean server.
First of all, using the simple approach works:
<context:mbean-export default-domain="${service.domain}"/>
However, I want to change the strategy for handling an existing instance. As the above mentioned tag just expands to an AnnotationMBeanExporter I tried this:
<bean class="org.springframework.jmx.export.annotation.Annotati onMBeanExporter"
p:registration-behavior-name="REGISTRATION_REPLACE_EXISTING"
p:autodetect-mode-name="AUTODETECT_ASSEMBLER"
p:default-domain="${service.domain}"
/>
Though, here things do not work as expected. It looks to me, as if publication does happen in another MBean-server and not the existing one.
Also this doesn't help:
<bean class="org.springframework.jmx.export.annotation.Annotati onMBeanExporter"
p:registration-behavior-name="REGISTRATION_REPLACE_EXISTING"
p:autodetect-mode-name="AUTODETECT_ASSEMBLER"
p:default-domain="${service.domain}"
p:server-ref="mbeanServer"
/>
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactory Bean"
p:locate-existing-server-if-possible="true"
/>
I saw that in MBeanExportBeanDefinitionParser there is an invocation of MBeanServerBeanDefinitionParser.findServerForSpeci alEnvironment() which seems to make the difference. Now my question is, how do I have to configure things, so that the WebLogic MBean server is used?
BTW: Some more configuration properties in context:mbean-export might be helpful.
Regards,
Andreas