Announcement Announcement Module
No announcement yet.
MBeanServerConnectionFactoryBean with Jboss 4.0.3 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • MBeanServerConnectionFactoryBean with Jboss 4.0.3

    i want to use MBeanServerConnectionFactoryBean to connect a remote jboss 's mbean server.
    but there are has some problem..
    the code like this:
    <bean id="clientConnector"
    class=" ConnectionFactoryBean">
    <property name="serviceUrl" value="service:jmx:rmi://remotehost/jndi/rmi://remotehost:1098/"/>
    <bean id="targetServerInfo"
    class="org.springframework.jmx.access.MBeanProxyFa ctoryBean">
    <property name="objectName" value="jboss.system:type=ServerInfo"/>
    <property name="serverInterface"
    <property name="server" ref="clientConnector"/>

    and throws exception:
    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'clientConnector' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: com.sun.jndi.rmi.registry.RegistryContext
    Caused by: java.lang.ClassCastException: com.sun.jndi.rmi.registry.RegistryContext

    who can tell me what is the right serviceurl for jboss, or we can not access the mbeanserver by this way.