1 8 9 package mx4j.examples.tools.remote.hessian.ssl; 10 11 import java.util.HashMap ; 12 import java.util.Map ; 13 14 import javax.management.MBeanServer ; 15 import javax.management.MBeanServerFactory ; 16 import javax.management.remote.JMXConnectorServer ; 17 import javax.management.remote.JMXConnectorServerFactory ; 18 import javax.management.remote.JMXServiceURL ; 19 20 import mx4j.tools.remote.http.HTTPConnectorServer; 21 22 53 public class Server 54 { 55 public static void main(String [] args) throws Exception 56 { 57 MBeanServer server = MBeanServerFactory.createMBeanServer(); 59 60 JMXServiceURL url = new JMXServiceURL ("hessian+ssl", null, 8443, "/hessianssl"); 62 63 Map serverEnv = new HashMap (); 65 serverEnv.put(HTTPConnectorServer.WEB_CONTAINER_CONFIGURATION, "<your-web-container-configuration>"); 66 JMXConnectorServer connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, serverEnv, server); 67 connectorServer.start(); 68 69 System.out.println("Server up and running " + connectorServer + " on " + url); 70 } 71 } 72 | Popular Tags |