You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by kpalania <kp...@yahoo.com> on 2008/08/12 17:00:14 UTC

Re: AMQ 5.1 - How to get a list of Queues

I can't seem to find the DestinationSource class - 

http://activemq.apache.org/maven/activemq-core/apidocs/

Has this been deprecated?


jlim wrote:
> 
> Hi Shaf,
> 
> Just tested this on 5.1.0 and seems to work fine on my test.   I tested 
> this using startup destinations 
> (http://activemq.apache.org/configure-startup-destinations.html) and 
> also creating one via jmx.
> 
> Can you look in jconsole (or any jmx console) to see if the queues are 
> actually created?
> 
> Regards,
> Jonas
> 
> shaf wrote:
>> 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<ActiveMQQueue> amqs = amqcon.getDestinationSource().getQueues();
>> 	Iterator<ActiveMQQueue> 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-tp17117156p18946046.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: AMQ 5.1 - How to get a list of Queues

Posted by James Strachan <ja...@gmail.com>.
2008/8/12 kpalania <kp...@yahoo.com>:
>
> I can't seem to find the DestinationSource class -
>
> http://activemq.apache.org/maven/activemq-core/apidocs/
>
> Has this been deprecated?

No its just the javadoc hasn't been redeployed in a while

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com