@Override public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination destination = info.getDestination(); if (destinationInterceptor != null) { destinationInterceptor.create(this, context, destination); } inactiveDestinationsPurgeLock.readLock().lock(); try { return getRegion(destination).addConsumer(context, info); } finally { inactiveDestinationsPurgeLock.readLock().unlock(); } }
@Override public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination destination = info.getDestination(); if (destinationInterceptor != null) { destinationInterceptor.create(this, context, destination); } synchronized (purgeInactiveDestinationsTask) { switch (destination.getDestinationType()) { case ActiveMQDestination.QUEUE_TYPE: return queueRegion.addConsumer(context, info); case ActiveMQDestination.TOPIC_TYPE: return topicRegion.addConsumer(context, info); case ActiveMQDestination.TEMP_QUEUE_TYPE: return tempQueueRegion.addConsumer(context, info); case ActiveMQDestination.TEMP_TOPIC_TYPE: return tempTopicRegion.addConsumer(context, info); default: throw createUnknownDestinationTypeException(destination); } } }
@Override public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination destination = info.getDestination(); if (destinationInterceptor != null) { destinationInterceptor.create(this, context, destination); } inactiveDestinationsPurgeLock.readLock().lock(); try { return getRegion(destination).addConsumer(context, info); } finally { inactiveDestinationsPurgeLock.readLock().unlock(); } }
@Override public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination destination = info.getDestination(); if (destinationInterceptor != null) { destinationInterceptor.create(this, context, destination); } inactiveDestinationsPurgeLock.readLock().lock(); try { return getRegion(destination).addConsumer(context, info); } finally { inactiveDestinationsPurgeLock.readLock().unlock(); } }
@Override public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { ActiveMQDestination destination = info.getDestination(); if (destinationInterceptor != null) { destinationInterceptor.create(this, context, destination); } inactiveDestinationsPurgeLock.readLock().lock(); try { return getRegion(destination).addConsumer(context, info); } finally { inactiveDestinationsPurgeLock.readLock().unlock(); } }