Announcement Announcement Module
Collapse
No announcement yet.
MBeanServerConnectionFactoryBean with Jboss 4.0.3 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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="org.springframework.jmx.support.MBeanServer ConnectionFactoryBean">
    <property name="serviceUrl" value="service:jmx:rmi://remotehost/jndi/rmi://remotehost:1098/"/>
    </bean>
    <bean id="targetServerInfo"
    class="org.springframework.jmx.access.MBeanProxyFa ctoryBean">
    <property name="objectName" value="jboss.system:type=ServerInfo"/>
    <property name="serverInterface"
    value="org.jboss.system.server.ServerInfoMBean"/>
    <property name="server" ref="clientConnector"/>
    </bean>

    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.
Working...
X