activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Lim <j...@exist.com>
Subject Re: how find a queue?
Date Wed, 06 Jun 2007 08:24:23 GMT
Hi Raffaele,
Just out of curiosity , what would you be doing with the Queue object?   
If you already know the name of an existing queue then you can just use 
Session.createQueue (or do a jndi lookup)  to get the queue object and  
use it to create a |MessageConsumer| or a |MessageProducer| to 
receive/send message  from/to that  queue.

Regards,
Jonas



Raffaele wrote:
> Hi,
>
> the createQueue method is implemented in this way:
> public Queue createQueue(String queueName) throws JMSException {
>          checkClosed();
>          return new ActiveMQQueue(queueName);
>      }
>
> And so, a new Object is created....Going deeper in the code I have seen no
> mechanism about retrieving already existing Queue based on its name. Perhaps
> am I wrong?
>
> Best regards,
>
> Raffaele
>
>
> jlim wrote:
>   
>> Hi,
>>
>> If you just want to get the handle of a queue object based on its name I 
>> think you can use  the Session.createQueue(String queueName)  method.
>>
>> Regards,
>> jonas
>>
>> *
>> *
>>
>>
>>
>> Raffaele wrote:
>>     
>>> Hi all,
>>>
>>> I'm looking for a method to retrieve a specific queue based on its name,
>>> that is a method that returns a Queue object.
>>>
>>> In Oracle JMS implementation there is such a method, here it is:
>>> http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b12023/oracle/jms/AQjmsSession.html#getQueue(java.lang.String,%20java.lang.String)
>>>
>>> In ActiveMQ does it exist analogous method?
>>>
>>> Best regards and thanks,
>>>
>>> Raffaele
>>>   
>>>       
>>     
>
>   

Mime
View raw message