The sample code below obtains a JMX Connector that communicates with the default RMI connector on the broker that is running on the host myhost
on port 7979. The administrator username and password used here is admin1
and adminpasswd
.
import javax.management.*; import javax.management.remote.*; import com.sun.messaging.AdminConnectionFactory; import com.sun.messaging.AdminConnectionConfiguration; ... AdminConnectionFactory acf; acf = new AdminConnectionFactory(); acf.setProperty(AdminConnectionConfiguration.imqAddress, "myhost:7979"); System.out.println("JMXServiceURL used: " + acf.getJMXServiceURL().toString()); JMXConnector jmxc = acf.createConnection("admin1", "adminpasswd"); // Proceed to manage/monitor the broker using the JMX Connector // obtained above. ...
The sample code below obtains a JMX Connector that communicates with the RMI connector named ssljmxrmi on the broker that is running on the localhost and on port 7676. This is the JMX connector that is configured to use SSL. The administrator username and password used here is the default admin
and admin
.
import javax.management.*; import javax.management.remote.*; import com.sun.messaging.AdminConnectionFactory; import com.sun.messaging.AdminConnectionConfiguration; ... AdminConnectionFactory acf; acf = new AdminConnectionFactory(); acf.setProperty(AdminConnectionConfiguration.imqAddress, "localhost:7676/ssljmxrmi"); System.out.println("JMXServiceURL used: " + acf.getJMXServiceURL().toString()); JMXConnector jmxc = acf.createConnection(); // Proceed to manage/monitor the broker using the JMX Connector // obtained above. ...@see com.sun.messaging.AdminConnectionConfiguration com.sun.messaging.AdminConnectionConfiguration
|
|
|
|
|
|