activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james.strac...@gmail.com>
Subject Re: AMQ + Programmatic Creation of Destinations + Registration in JNDI
Date Tue, 04 Aug 2009 15:15:51 GMT
2009/8/4 jworkman <jworkman@oidev.com>:
>
>
>
> James.Strachan wrote:
>>
>> 2009/8/4 jworkman <jworkman@oidev.com>:
>>>
>>> I am not sure I follow... When I do ctx.lookup("dyanmicQueues/whatever")
>>> what
>>> will this do? Create a queue if one does not exist in the destination amq
>>> server?
>>
>> Yes, see this FAQ entry...
>> http://activemq.apache.org/how-do-i-create-new-destinations.html
>>
>>
>>> What is happening currently on the remote (calling) client: I can access
>>> the
>>> factory and create the connection with a session okay, but when I try to
>>> do
>>> a lookup for the domain/queue (which I explicitly created by calling
>>> createQueue("domain/queue") on destination amq server) I get queue not
>>> found.
>>>
>>> Is prepending dynamicQueues/ the only way around?
>>
>> use the "dynamicQueues/whatever" to look up the Queue object in JNDI
>> (which will map to the "whatever" queue in ActiveMQ.
>>
>>
>
> So in regards to the above does this mean that whatever has to be regsitered
> in activemq or will it be so automatically if whatever did not exist? So in
> theory, I could call "dyanmicQueues/bob or dynamicQueues/frank" and these
> would get created automatically?

Yes, dynamicQueues/foo means you can use any value of "foo" at runtime
and it just works - a Queue/Topic will be created for you
automatically.

Though if you are calling createQueue(String) or createTopic(String)
on a Session, you don't need to do anything with JNDI at all.

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

Open Source Integration
http://fusesource.com/

Mime
View raw message