I have an MBean (JMX) which is exposed through RMI in a JBoss AS 7.1 Server but I can't access it. I already follow all of the tutorials revolving around but it just cant work.
This is how I exposed my MBean
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
<bean id="mBeanExporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
<map>
<entry
key="test:name=foo"
value-ref="foo" />
</map>
</property>
<property name="server" ref="mbeanServer" />
</bean>
<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
<property name="port" value="1399" />
</bean>
<bean id="serverConnector"
class="org.springframework.jmx.support.ConnectorServerFactoryBean">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl"
value="service:jmx:rmi://192.168.1.108/jndi/rmi://192.168.1.108:1399/myconnector" />
<property name="server">
<ref local="mbeanServer" />
</property>
</bean>
How can I remotely access this in Jconsole ? I've already tried these: service:jmx:remoting-jmx://192.168.1.108:9999 service:jmx:rmi:///jndi/rmi://192.168.1.108:1090/jmxrmi service:jmx:rmi:///jndi/rmi://192.168.1.108:1090/myconnector
And many more but none of those work. What am I doing wrong or what should I do ?
On JBoss 7 /EAP6 is can't use rmi for remote jmx calls, JBoss uses
remoting-jmx
protocol forjmx
.You can see a full example in: Using Spring to call jmx bean on JBoss7 / EAP 6