Re: RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-23 Thread Bernd Eckenfels
All Stream Sockets where you specify an bind address (different from InAddrAny aka :: or 0.0.0.0) are only bound to a single address family. You can't bind a single listening socket to a dual stack localhost IP Address. getLoopbackAddress is either ::1 or 127.0.0.1 (depending on the stack

Re: RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-22 Thread Chris Hegarty
Stuart, I think I would have picked the more common IPv4 loopback address, 127.0.0.1, but what you have is fine. -Chris. On 08/22/2013 01:58 AM, Stuart Marks wrote: Hi all, Please review this small documentation change to the example I added to RMISocketFactory a couple weeks ago [1]. This

Re: RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-22 Thread Alan Bateman
On 22/08/2013 01:58, Stuart Marks wrote: Hi all, Please review this small documentation change to the example I added to RMISocketFactory a couple weeks ago [1]. This change fixes a problem that Bernd Eckenfels pointed out [2] where the interface returned by getLoopbackAddress() might not

Re: RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-22 Thread Alan Bateman
On 22/08/2013 13:48, Bernd Eckenfels wrote: getLoopbackAddress is either ::1 or 127.0.0.1 (depending on the stack preferemces) and InetAddress.getByName(localhost) is also one of both (but not necesarily the same, unfortunately). This happened to me in the past, so I wanted to make sure that

Re: RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-22 Thread Stuart Marks
On 8/22/13 6:48 AM, Alan Bateman wrote: On 22/08/2013 13:48, Bernd Eckenfels wrote: getLoopbackAddress is either ::1 or 127.0.0.1 (depending on the stack preferemces) and InetAddress.getByName(localhost) is also one of both (but not necesarily the same, unfortunately). This happened to me in

RFR: 8022445: fix RMISocketFactory example to avoid using localhost

2013-08-21 Thread Stuart Marks
Hi all, Please review this small documentation change to the example I added to RMISocketFactory a couple weeks ago [1]. This change fixes a problem that Bernd Eckenfels pointed out [2] where the interface returned by getLoopbackAddress() might not match the interface that localhost resolves