Can I stop/restart agent remotely?/ Can I change agents port number at runtime?/ Can I change agents loggers logging level at runtime?
A. Yes to all these questions. First, you need to start a server which makes MBeans remotely accessible. One approach is to start an http adaptor such as HttpAdaptor (included in MX4J) or HtmlAdaptor (included in SUN’s JMX RI), so you can use a web browser to remotely manage agents. Check out AgentMX4J.java and JMXAdaptor.java examples for details. Another approach is to start JRMP of MX4J (startJRMPAdaptor method in AgentMX4J.java) , and you can use a client such as MC4J to monitor and control agent via RMI. A screenshot of MC4J is shown below.