[jboss-user] [Management, JMX/JBoss] - Re: Spring JMX issues in JBoss

krishh do-not-reply at jboss.com
Thu Jun 5 13:32:51 EDT 2008

repost: some of the bean definitions were lost when posted.
I have defined these beans in my appContext.
    <bean id=mbeanServer class=org.springframework.jmx.support.MBeanServerFactoryBean>
     <!-- indicate to first look for a server -->
     <property name=locateExistingServerIfPossible value=true/>
   <bean id=exporter class=org.springframework.jmx.export.MBeanExporter lazy-init=false>
        <property name=server ref=mbeanServer/> <!-- refer to spring's factory comment out if using another jmx server agent-->
        <property name=assembler ref=assembler/>
        <property name=namingStrategy ref=namingStrategy/>
        <property name=autodetect value=true/>
        <property name=registrationBehaviorName value=REGISTRATION_IGNORE_EXISTING/>

    <bean id=jmxAttributeSource

    <!-- will create management interface using annotation metadata -->
    <bean id=assembler
        <property name=attributeSource ref=jmxAttributeSource/>

    <!-- will pick up the ObjectName from the annotation -->
    <bean id=namingStrategy
        <property name=attributeSource ref=jmxAttributeSource/>

And in one of my spring beans, I have annotations
@ManagedResource(objectName = "spring.ua:service=TimePeriodServiceExecutione r", description = "A sample JMX-managed bean")
public class TimePeriodServiceImpl
implements TimePeriodService{

and a method
public List getAllResolutionsAsStrings()

When I build my ear, deploy it in Jboss, I am not able to see the auto detected managed bean in my JMXConsole. why?
It appears when JBoss start the mbeans are registered. What do I need to do to make the mbeans visible on the JMXConsole.

Thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156069#4156069

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156069

More information about the jboss-user mailing list