git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@639667 13f79535-47bb-0310-9956-ffa450edef68

This commit is contained in:
Hiram R. Chirino 2008-03-21 15:29:55 +00:00
parent f6856a893c
commit 0a4c8064e4
1 changed files with 11 additions and 2 deletions

View File

@ -19,6 +19,7 @@ package org.apache.activemq.network;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -173,8 +174,16 @@ public abstract class NetworkConnector extends NetworkBridgeConfiguration implem
dests = destsList.toArray(new ActiveMQDestination[destsList.size()]); dests = destsList.toArray(new ActiveMQDestination[destsList.size()]);
result.setStaticallyIncludedDestinations(dests); result.setStaticallyIncludedDestinations(dests);
if (durableDestinations != null) { if (durableDestinations != null) {
ActiveMQDestination[] dest = new ActiveMQDestination[durableDestinations.size()];
dest = (ActiveMQDestination[])durableDestinations.toArray(dest); HashSet<ActiveMQDestination> topics = new HashSet<ActiveMQDestination>();
for (ActiveMQDestination d : durableDestinations) {
if( d.isTopic() ) {
topics.add(d);
}
}
ActiveMQDestination[] dest = new ActiveMQDestination[topics.size()];
dest = (ActiveMQDestination[])topics.toArray(dest);
result.setDurableDestinations(dest); result.setDurableDestinations(dest);
} }
return result; return result;