Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 54761 invoked from network); 8 May 2008 11:19:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2008 11:19:32 -0000 Received: (qmail 27525 invoked by uid 500); 8 May 2008 11:19:32 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 27495 invoked by uid 500); 8 May 2008 11:19:31 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 27474 invoked by uid 99); 8 May 2008 11:19:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 04:19:31 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 64.233.178.251 as permitted sender) Received: from [64.233.178.251] (HELO hs-out-0708.google.com) (64.233.178.251) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 11:18:44 +0000 Received: by hs-out-0708.google.com with SMTP id j58so437623hsj.6 for ; Thu, 08 May 2008 04:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=0lYlyW9cemGrO9YFoc9wmz91y16l9WCrggeOHabeOwk=; b=bky5ojWj7yko9mMXHRpMEVg1qiOy2eidFYiGhi3/yCx5U8LARHw0k1vXNSvIwsNcJL6WxigoaIN6dwOhOP4PQFpoONCkoU7JV8gO8lFCAuEYJU8Cu3Pp1ziLTzNjTVK8gj7EZWvMVtBERPnZnJpwC9hIhOOjlYM4IAPVf9PZb9E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oxjbrCrV6tnpnioPpJ4vhYYWtzSDQL9HLkD9/sQHqVp5cjD3nc6SpeJlG1f6IcIRkZRmJ34fPf9CngnDxKNWX2u41+rpuXf6CtzpGC8Xu3TDJRGWOF8FYNkJFpt4yNdrtwCFb9Rxj9sIWIWfyOvBOHskkypZFdJ90GixC4FJHuo= Received: by 10.90.65.5 with SMTP id n5mr4597381aga.75.1210245538289; Thu, 08 May 2008 04:18:58 -0700 (PDT) Received: by 10.90.82.6 with HTTP; Thu, 8 May 2008 04:18:58 -0700 (PDT) Message-ID: Date: Thu, 8 May 2008 12:18:58 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: AMQ 5.1 - How to get a list of Queues In-Reply-To: <17117156.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17117156.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org BTW you can listen to destinations being added/removed by calling the setDestinationListener method on the DestinationSource 2008/5/8 shaf : > > Hello, > > I am trying to get a list of existing Queues with the following code: > > ActiveMQConnectionFactory connectionFactory = new > ActiveMQConnectionFactory( server ); > ActiveMQConnection amqcon = connectionFactory.createConnection(); > Set amqs = amqcon.getDestinationSource().getQueues(); > Iterator queues = amqs.iterator(); > > while ( queues.hasNext() ) > { > ActiveMQQueue queue = queues.next(); > System.out.println( "Queue: " + queue.getPhysicalName() ); > } > > The code above does not work consistently. I have a sample queue as well as > one that I created using the admin interface and none show up. Can someone > provide some guidance here please. > > Thanks, > Shaf. > -- > View this message in context: http://www.nabble.com/AMQ-5.1---How-to-get-a-list-of-Queues-tp17117156s2354p17117156.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com