All remote objects, including the registry, exported from the same JVM, can share the same port. This is the main function of RMI.
You would only like to use them on different ports if, for example, one used SSL and the other did not, or if they were in different JVMs
source
share