accounts for nested Destination filters.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1489485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2013-06-04 15:44:50 +00:00
parent ba37cbb1de
commit 8a524d52ef
1 changed files with 7 additions and 2 deletions

View File

@ -389,8 +389,13 @@ public class DestinationFilter implements Destination {
}
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
if (next instanceof Topic) {
((Topic) next).deleteSubscription(context, key);
Destination target = next;
while (target instanceof DestinationFilter) {
target = ((DestinationFilter) target).next;
}
if (target instanceof Topic) {
Topic topic = (Topic)target;
topic.deleteSubscription(context, key);
}
}
}