test/java/rmi/server/RMISocketFactory/useSocketFactory/activatable/EchoImpl.java

Print this page

        

*** 126,137 **** ActivationSystem system = ActivationGroup.getSystem(); ActivationGroupID groupID = system.registerGroup(groupDesc); ActivationGroup.createGroup(groupID, groupDesc, 0); EchoImpl impl = new EchoImpl(protocol); ! System.out.println("EchoServer: binding in registry"); ! Naming.rebind("//:" + UseCustomSocketFactory.REGISTRY_PORT + "/EchoServer", impl); System.out.println("EchoServer ready."); } catch (Exception e) { System.err.println("EXCEPTION OCCURRED:"); e.printStackTrace(); --- 126,138 ---- ActivationSystem system = ActivationGroup.getSystem(); ActivationGroupID groupID = system.registerGroup(groupDesc); ActivationGroup.createGroup(groupID, groupDesc, 0); EchoImpl impl = new EchoImpl(protocol); ! int registryPort = new Integer(System.getProperty("rmi.registry.port")); ! System.out.println("EchoServer: binding in registry on port:" + registryPort); ! Naming.rebind("//:" + registryPort + "/EchoServer", impl); System.out.println("EchoServer ready."); } catch (Exception e) { System.err.println("EXCEPTION OCCURRED:"); e.printStackTrace();