Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Trouble with Spring JMX with JBoss 4.0.3

  1. #11
    Join Date
    Jan 2006
    Posts
    1

    Default Locate jboss mbeanserver

    Quote Originally Posted by costin
    What about using setServer along with JMXUtils.locateMBeanServer; smth like (from the tip of my head):

    Code:
    <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
            lazy-init="false">
        <property name="server">
          <bean class="org.springframework.jmx.JmxUtils" factory-method="locateMBeanServer">
             <constructor-arg value="myJmxMBeanServerName"/>
          </bean>
        </property>
    </bean>
    You can also use a locator from JBoss:

    Code:
    <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
            lazy-init="false">
        <property name="server">
          <bean class="org.jboss.mx.util.MBeanServerLocator" factory-method="locateJBoss"/>
        </property>
    </bean>
    http://wiki.jboss.org/wiki/Wiki.jsp?...indMBeanServer

  2. #12
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    I certainly don't think there is a bug in either codebase related to this. Its simply a case of one set of objects being registed in one MBeanServer and another set inside a second MBeanServer. Spring will try to locate the running MBeanServer but it can only guess at the first MBeanServer it encounters unless you specify an agentId.

    Look at MBeanServerFactoryBean for more information on configuring lookup.
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •