RMI and JMX Socket Factories
I'm trying to start an embedded JMX server in my java app. I want to use the same port for the RMI Registry and for the actual RMI traffic (or JMX traffic if you like). Apparently this is possible since the RMI Registry is merely a Remote Object itself . The added difficulty is that I need to use Socket Factories because I need to bind to a specific NIC. I start off by: int registryPort = 3012; int jmxPort = 3012; // use the same port and here's my server socket factory. Pretty straight-forward stuff: public class MyRMIServerSocketFactory implements RMIServerSocketFactory { private final