Search code examples
apache-camelactivemq-classicjmxosgi-bundlejbossfuse

JBoss Fuse JMX not working


I tried to connect JMX rmi url in Jboss fuse container for monitoring the queues. The URL not connected in jconsole,

service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel

I want to implement in my bundle, How to connect MBean server in JBoss Fuse?

Advance Thanks.


Solution

  • Finally solved the issue with the karaf username and password, Check with the username and password in users.properties file.

     service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
    

    It should work.

    JMXServiceURL url = new JMXServiceURL(serviceURL);
         HashMap<String, String[]> environment = new HashMap<String, String[]>();
             String username = "admin";
             String password = "admin";
             String[] credentials = new String[] { username, password };
             environment.put("jmx.remote.credentials", credentials);
    
          connectorServer = JMXConnectorFactory.connect(url,environment);