git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@646395 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-04-09 15:03:42 +00:00
parent 3ee5854e90
commit 4acbd5900a
3 changed files with 43 additions and 0 deletions

View File

@ -59,6 +59,8 @@ public abstract class JmsConnector implements Service {
protected String outboundPassword; protected String outboundPassword;
protected String localUsername; protected String localUsername;
protected String localPassword; protected String localPassword;
protected String outboundClientId;
protected String localClientId;
protected LRUCache replyToBridges = createLRUCache(); protected LRUCache replyToBridges = createLRUCache();
private List<DestinationBridge> inboundBridges = new CopyOnWriteArrayList<DestinationBridge>(); private List<DestinationBridge> inboundBridges = new CopyOnWriteArrayList<DestinationBridge>();
@ -277,7 +279,36 @@ public abstract class JmsConnector implements Service {
public void setOutboundUsername(String outboundUsername) { public void setOutboundUsername(String outboundUsername) {
this.outboundUsername = outboundUsername; this.outboundUsername = outboundUsername;
} }
/**
* @return the outboundClientId
*/
public String getOutboundClientId() {
return outboundClientId;
}
/**
* @param outboundClientId the outboundClientId to set
*/
public void setOutboundClientId(String outboundClientId) {
this.outboundClientId = outboundClientId;
}
/**
* @return the localClientId
*/
public String getLocalClientId() {
return localClientId;
}
/**
* @param localClientId the localClientId to set
*/
public void setLocalClientId(String localClientId) {
this.localClientId = localClientId;
}
protected void addInboundBridge(DestinationBridge bridge) { protected void addInboundBridge(DestinationBridge bridge) {
inboundBridges.add(bridge); inboundBridges.add(bridge);
} }

View File

@ -210,6 +210,9 @@ public class JmsQueueConnector extends JmsConnector {
} }
} }
} }
if (localClientId != null && localClientId.length() > 0) {
outboundQueueConnection.setClientID(getOutboundClientId());
}
outboundQueueConnection.start(); outboundQueueConnection.start();
} }
@ -243,6 +246,9 @@ public class JmsQueueConnector extends JmsConnector {
} }
} }
} }
if (localClientId != null && localClientId.length() > 0) {
localQueueConnection.setClientID(getLocalClientId());
}
localQueueConnection.start(); localQueueConnection.start();
} }

View File

@ -210,6 +210,9 @@ public class JmsTopicConnector extends JmsConnector {
} }
} }
} }
if (localClientId != null && localClientId.length() > 0) {
outboundTopicConnection.setClientID(getOutboundClientId());
}
outboundTopicConnection.start(); outboundTopicConnection.start();
} }
@ -243,6 +246,9 @@ public class JmsTopicConnector extends JmsConnector {
} }
} }
} }
if (localClientId != null && localClientId.length() > 0) {
localTopicConnection.setClientID(getLocalClientId());
}
localTopicConnection.start(); localTopicConnection.start();
} }