Excellent !  Thank you Robert.
Your suggestion works!

jeff


On Sat, 2009-02-07 at 11:53 +0000, Robert Greig wrote:
> Hi Jeff,
> 
> >  I'm currently working on an AMQP gateway for the JBoss ESB using the
> > QPid Java client libraries.  I have gotten it to work ... but did
> > experience a few issues along the way.  I made modifications to the
> > JBoss ESB to accommodate the problem I was experiencing.  Please see the
> > ESB forum post for details :
> >
> > http://www.jboss.com/index.html?module=bb&op=viewtopic&t=150019
> 
> The idea is that when you are referring to connection factories or
> destinations you don't include the prefix "destination" or
> "connectionfactory". So in your example you should make the following
> change:
> 
> <jms-provider name="JMS"
> connection-factory="connectionfactory.qpidConnectionFactory">
>               <property name="jndi-prefixes"
> value="connectionfactory.,destination." />
>               <property name="java.naming.factory.initial"
> value="org.apache.qpid.jndi.PropertiesFileInitialContextFactory"/>
>               <property name="connectionfactory.qpidConnectionFactory"
>    
> value="amqp://guest:gu...@clientid/virtualHost?brokerlist='tcp://ratwater:5672'"/>
>               <property name="destination.Alpha_Co"
> value="direct://usmc.tracks/Alpha_Co_queue?routingkey='Alpha_Co_key'"/>
>               <jms-bus busid="quickstartGwChannel">
>                   <jms-message-filter dest-type="QUEUE"
> dest-name="Alpha_Co" /><!-- NOTE THE CHANGE ON THIS LINE -->
>               </jms-bus>
> </jms-provider>
> 
> The reason for having prefixes is that the config is just simple
> name/value pairs and there is no other way to distinguish the "type"
> of the item being defined. This is even the case in the example above
> - for example, the connection factory is not distinguishable from the
> destination unless you want to attempt to parse each item and figure
> it out which is messy.
> 
> However when looking up the items from JNDI it is redundant to keep
> the prefix, so you don't use them. If you migrate to using an LDAP
> server for example, which allows a hierarchy for the names, you would
> not want to have to put prefixes in the names (or change the rest of
> your config or code to change the lookup name).
> 
> ActiveMQ also does this. I am not sure about other providers (which
> may or may not provide a properties file facade for JNDI).
> 
> I hope this clarifies things.
> 
> Robert
-- 
Jeffrey Bride
RedHat / JBoss
303-523-7885



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to