Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 15787 invoked from network); 8 May 2008 13:59:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2008 13:59:04 -0000 Received: (qmail 70767 invoked by uid 500); 8 May 2008 13:59:05 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 70744 invoked by uid 500); 8 May 2008 13:59:05 -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 70733 invoked by uid 99); 8 May 2008 13:59:05 -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 06:59:05 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 13:58:17 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ju6dP-00006z-8o for users@activemq.apache.org; Thu, 08 May 2008 06:58:11 -0700 Message-ID: <17125731.post@talk.nabble.com> Date: Thu, 8 May 2008 06:58:11 -0700 (PDT) From: ttmdev To: users@activemq.apache.org Subject: Re: AMQ 5.1 - How to get a list of Queues In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: joe.fernandez@ttmsolutions.com References: <17117156.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org FYI - the "Destination" link @ the top of http://activemq.apache.org/activemq-510-release.html is broken. Joe James.Strachan wrote: > > 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 > > -- View this message in context: http://www.nabble.com/AMQ-5.1---How-to-get-a-list-of-Queues-tp17117156s2354p17125731.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.