Oracle reported this during Oracle 10g Grid Control testing. On jdk 1.4.2_08, the ServerSocket call does not throw an expected IOException for a used port #, whereas the call throws the expected IOException on jdk 1.2.2 for the same, used port #.
Oracle is asking if there is a method to obtain a free port #, instead of cycling through all port #s serially.
Also, on the 1.4.2_08 m/c, another used port gave the expected IOException. Hence, this issue is not seen consistently for all port #s in the 1.4.2_08 m/c.
Test case (file socketport.txt) is attached. The port # that Oracle used may be different from that on our m/c's.