// SSL support
ObjectName sslFactory = new ObjectName("Adaptor:service=SSLServerSocketFactory");
server.createMBean("mx4j.tools.adaptor.ssl.SSLAdaptorServerSocketFactory", sslFactory, null);
SSLAdaptorServerSocketFactoryMBean factory = (SSLAdaptorServerSocketFactoryMBean)MBeanServerInvocationHandler.newProxyInstance(server, sslFactory, SSLAdaptorServerSocketFactoryMBean.class, false);
// Customize the values below
factory.setKeyStoreName("certs");
factory.setKeyStorePassword("mx4j");
server.setAttribute(serverName, new Attribute("SocketFactoryName", sslFactory));
// starts the server
server.invoke(serverName, "start", null, null);