JDK-8020854 : change RMI javadocs to specify that remote objects are exported to the wildcard address
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-07-18
  • Updated: 2017-05-17
  • Resolved: 2013-08-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b103Fixed
Related Reports
Relates :  
Relates :  
Description
If UnicastRemoteObject is extended without specifying a server socket factory, or if the exportObject() overload that lacks socket factories is called, then the remote object is exported to the wildcard address.

The javadocs for UnicastRemoteObject and RMISocketFactory should specify that the default is that the exported object listens on the wildcard address. This is irrespective of the java.rmi.server.hostname property.

The javadocs should also mention alternatives for restricting the socket. This can be accomplished by using a global RMI socket factory, by providing server and client socket factories, or by setting a policy that restricts connection acceptance only from specific hosts or networks. It's not clear to me that example code is necessary, as it can easily get overly complicated, although snippets might be reasonable. References to specific APIs or security policy permissions are probably sufficient.

It would probably also be a good idea for the RMISocketFactory class to describe the behavior of the default socket factory when creating server sockets, i.e. that it listens on the wildcard interface.

JDK-7076394 covers corresponding changes to RMI web documentation.
Comments
Clarifications in javadoc, no code change, "noreg-doc" tag was added
19-08-2013