-
Aug 10th, 2006, 04:52 AM
#1
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules