How to connect JBoss 7.1.1 remoting -jmx via java code? -
i have jboss 7.1.1 server, want write jmx client. far understood, jboss 7.1.1 not using typical rmi based jmx , have given layer of remoting-jmx on native management. using following code:
jmxserviceurl address = new jmxserviceurl("service:jmx:remoting-jmx://localhost:9999"); map env = jmxconnectorconfig.getenvironment(paramtbl); jmxconnector connector = jmxconnectorfactory.connect(address, env); but giving following exception:
java.net.malformedurlexception: unsupported protocol: remoting-jmx i googled , following thread seems relevant: https://community.jboss.org/thread/204653?tstart=0
it asks add jboss's libraries classpath. tried still getting same exception.
i got same exception when trying jmxserviceurl. make sure in standalone.xml have following:
<subsystem xmlns="urn:jboss:domain:jmx:1.1"> <show-model value="true"/> <remoting-connector use-management-endpoint="true" /> </subsystem>
and should include in project classpath jar named: jboss-client.jar, can found in jboss_directory/bin/client. in fact, jmx client must include jar in classpath.
this tip fixed problem me..hope helpful
Comments
Post a Comment