Description
org.apache.activemq.util.IdGenerator is unable to generate a unique id if a range of ports have been block.
Currently there is only one strategy create this id if the canAccessSystemProps condition is true:
if (canAccessSystemProps) { try { hostName = InetAddressUtil.getLocalHostName(); ServerSocket ss = new ServerSocket(0); stub = "-" + ss.getLocalPort() + "-" + System.currentTimeMillis() + "-"; Thread.sleep(100); ss.close(); } catch (Exception ioe) { LOG.warn("could not generate unique stub", ioe); } } else { hostName = "localhost"; stub = "-1-" + System.currentTimeMillis() + "-"; }
No fallback strategy has been implemented if the canAccessSystemProp evaluates to true