1 8 9 package mx4j.examples.tools.remote.hessian; 10 11 import javax.management.MBeanServer ; 12 import javax.management.MBeanServerFactory ; 13 import javax.management.remote.JMXConnectorServer ; 14 import javax.management.remote.JMXConnectorServerFactory ; 15 import javax.management.remote.JMXServiceURL ; 16 17 46 public class Server 47 { 48 public static void main(String [] args) throws Exception 49 { 50 MBeanServer server = MBeanServerFactory.createMBeanServer(); 52 53 JMXServiceURL url = new JMXServiceURL ("hessian", null, 8080, "/hessian"); 55 56 JMXConnectorServer connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server); 57 connectorServer.start(); 58 59 System.out.println("Server up and running " + connectorServer + " on " + url); 60 } 61 } 62 | Popular Tags |