Announcement Announcement Module
No announcement yet.
Problem with definition of JMX server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with definition of JMX server

    I have encountered the following problem:

    I have these beans defined in my applicationContext.xml file

    <bean id="jmxExporter" class="org.springframework.jmx.export.annotation.A nnotationMBeanExporter" >
    <property name="server"><ref local="jmxServer"/></property>

    <bean id="jmxServer" class=" FactoryBean" >

    When I try to access remotely my JMX-enabled beans via jconsole I do not see them in UI.

    I could see them only after I added <property name="locateExistingServerIfPossible" value="true" /> to definition of "jmxServer" bean.

    According to Spring tutorial this is not required if I have in "jmxExporter" bean the explicit reference to "jmxServer" bean.

    I use Java 5 and Spring 2.5.

    Can anybody comment on this issue ?

    Thank you.

  • #2

    Iam always using this configuration to expose beans. It works fine for me beacuse I am deployng on jboss.

    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporte r" lazy-init="false">
    <property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
    <property name="assembler">
    <bean class="org.springframework.jmx.export.assembler.In terfaceBasedMBeanInfoAssembler">
    <property name="managedInterfaces" value="" />
    <property name="beans">
    <util:map id="serviceBeans">
    <entry key="" value-ref="clientService" />


    If you don't use the AS try to add the following:
    <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistr yFactoryBean">
    <property name="port" value="11099" />

    <bean class=" rverFactoryBean" depends-on="registry">
    <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:11099/jmxrmi" />