mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3614 - Unable to generate unique id when range of ports are blocked - org.apache.activemq.util.IdGenerator. Patch applied with thanks, left the log at warn as unique ids are important and two simultaneous clients could use the same id with this fallback
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1209162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1bbaec66b
commit
a2fc5bc492
|
@ -56,10 +56,14 @@ public class IdGenerator {
|
|||
Thread.sleep(100);
|
||||
ss.close();
|
||||
} catch (Exception ioe) {
|
||||
LOG.warn("could not generate unique stub", ioe);
|
||||
LOG.warn("could not generate unique stub by using DNS and binding to local port", ioe);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
// fallback
|
||||
if (hostName == null) {
|
||||
hostName = "localhost";
|
||||
}
|
||||
if (stub.length() == 0) {
|
||||
stub = "-1-" + System.currentTimeMillis() + "-";
|
||||
}
|
||||
UNIQUE_STUB = stub;
|
||||
|
|
Loading…
Reference in New Issue