added better exception message

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@383565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-06 15:33:43 +00:00
parent db9144a985
commit 900f6e9de1
1 changed files with 4 additions and 2 deletions

View File

@ -66,12 +66,14 @@ public class TopicRegion extends AbstractRegion {
lookup(context, destination); lookup(context, destination);
} }
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubcriptionName()); String clientId = context.getClientId();
String subcriptionName = info.getSubcriptionName();
SubscriptionKey key = new SubscriptionKey(clientId, subcriptionName);
DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key); DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key);
if (sub != null) { if (sub != null) {
if (sub.isActive()) { if (sub.isActive()) {
throw new JMSException("Durable consumer is in use"); throw new JMSException("Durable consumer is in use for client: " + clientId + " and subscriptionName: " + subcriptionName);
} }
// Has the selector changed?? // Has the selector changed??