In context of RMI
The static method UnicastRemoteObject.exportObject exports the supplied remote object to receive incoming remote method invocations on an anonymous TCP port and returns the stub for the remote object to pass to clients. As a result of the exportObject call, the runtime may begin to listen on a new server socket or may use a shared server socket to accept incoming remote calls for the remote object.
Could anyone please tell me the the meaning of Shared here ?
This simply means that the RMI runtime may choose to have a single server socket (essentially the port) to receive requests for multiple exported object.
At runtime, since both the stubs on client and server side are RMI specific, so RMI can safely pass information as to whether the socket is shared and if shared, which server object does a request must go.