mirror of https://github.com/apache/activemq.git
Was having some jmx dup id issues.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@392283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
68779c0aa5
commit
064880b08a
|
@ -149,6 +149,12 @@ public class TransportConnector implements Connector {
|
|||
}
|
||||
|
||||
public URI getUri() {
|
||||
if( uri == null ) {
|
||||
try {
|
||||
uri = getConnectUri();
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
|
||||
|
@ -265,10 +271,9 @@ public class TransportConnector implements Connector {
|
|||
|
||||
public URI getConnectUri() throws IOException, URISyntaxException {
|
||||
if( connectUri==null ) {
|
||||
if( getServer().getConnectURI()==null ) {
|
||||
throw new IllegalStateException("The transportConnector has not been started.");
|
||||
if( server !=null ) {
|
||||
connectUri = server.getConnectURI();
|
||||
}
|
||||
connectUri = getServer().getConnectURI();
|
||||
}
|
||||
return connectUri;
|
||||
}
|
||||
|
@ -286,16 +291,8 @@ public class TransportConnector implements Connector {
|
|||
}
|
||||
|
||||
public String getName(){
|
||||
if(name==null){
|
||||
if(server!=null){
|
||||
if(server.getConnectURI()!=null){
|
||||
name=server.getConnectURI().toString();
|
||||
}else{
|
||||
name = server.getClass() + ":Not started";
|
||||
}
|
||||
}else{
|
||||
name = "NOT_SET";
|
||||
}
|
||||
if( name==null ){
|
||||
name = getUri().toString();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ManagedTransportConnector extends TransportConnector {
|
|||
}
|
||||
|
||||
protected static synchronized long getNextConnectionId() {
|
||||
return nextConnectionId;
|
||||
return nextConnectionId++;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue