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: Posting to a virtual topic's physical queue
Date Wed, 23 May 2007 18:22:33 GMT
On 5/23/07, David Budworth <dbudworth@gmail.com> wrote:
> For what it's worth (James' solutions are probably better)... if you need
> 'random' access to queues from jboss (or any JNDI enforced thing), you can
> create your own JNDI context (javax.naming.Context) and bind that to some
> spot in the jboss jndi tree, then all you do is override Context.lookup(name)
> to return a new Queue('name')
>
> example, in our case, our queues are in the form of 'work.queue.[SOME QUEUE
> NAME]'
> and we bind out context object to /jms/auto/queue
>
> then in the MDBs (ejb3 MDB) we just set the queue jndi name to
> "/jms/auto/queue/work.queue.blah"
>
> keeps us from having to define the queue in some kind of jndi binding tree
> in addition to the (required) MDB setting.
>
> Like I said, James' solution is probably better, but if you are stuck using
> MDBs, there's really no alternative since the spec requires JNDI bindings
> for the destination.

Good point David, thanks.

I guess it might make sense to bind the ActiveMQ JNDI context into the
JBoss JNDI tree, then you can use the 'auto-destination creation'
stuff

http://activemq.apache.org/jndi-support.html

(see the section called "Dynamically creating destinations")

So if ActiveMQ was bound to /activemq then you could lookup

/activemq/dynamicQueues/ANY.NAME.I.LIKE

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

Mime
View raw message