Create a better ObjectName for dynamic destination producers.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1133564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2011-06-08 21:37:18 +00:00
parent c43282ed8e
commit d34967bdd0
1 changed files with 4 additions and 3 deletions

View File

@ -707,8 +707,8 @@ public class ManagedRegionBroker extends RegionBroker {
String destinationName = "destinationName=";
if (producerInfo.getDestination() == null) {
destinationType += "NOTSET";
destinationName += "NOTSET";
destinationType += "dynamic";
destinationName = null;
} else {
destinationType += producerInfo.getDestination().getDestinationTypeAsString();
destinationName += JMXSupport.encodeObjectNamePart(producerInfo.getDestination().getPhysicalName());
@ -719,7 +719,8 @@ public class ManagedRegionBroker extends RegionBroker {
ObjectName objectName = new ObjectName(brokerObjectName.getDomain() + ":" + "BrokerName=" + map.get("BrokerName") + ","
+ "Type=Producer" + ","
+ destinationType + "," + destinationName + ","
+ destinationType + ","
+ (destinationName != null ? destinationName + "," : "")
+ clientId + "," + producerId);
return objectName;
}