Hi Arnaud, great suggestion ... that approach also works .... unless the amqp.properties is included in the ESB archive. In JBoss, property files are typically packaged in the root of any type of JEE (*.jar) or JBoss specific archive (*.esb, *.sar). Subsequently, those property files end up in the classpath of the classloader that deployed the archive. So, as an example, the following change in the getInitialContext method of PropertiesFileInitialContextFactory.java allows an amqp.properties file to be found when packaged in an ESB archive :
p.load(this.getClass().getResourceAsStream(file)); Personally, I can move forward without this being addressed. But, my guess is that locating the amqp.properties in the classpath of the JBoss classloader might want to be considered. thanks again! jeff On Mon, 2009-02-09 at 09:43 +0100, Arnaud Simon wrote: > 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 > >> > Hi Jeff, > > Another solution would be for you to use the property > java.naming.provider./url /to specify the path to a qpid property file. > > <jms-provider name="JMS" > connection-factory="connectionfactory.qpidConnectionFactory"> > <property name="java.naming.provider./url/" value="file://path/qpid.jndi" > /> > <property name="qpidConnectionFactory" value=""/> > <jms-bus busid="quickstartGwChannel"> > <jms-message-filter dest-type="QUEUE" dest-name="Alpha_Co" /> > </jms-bus> > </jms-provider> > > the file /path/qpid.jndi would look like: > > ava.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory > connectionfactory.qpidConnectionFactory=amqp://guest:gu...@clientid/virtualHost?brokerlist='tcp://ratwater:5672' > destination.Alpha_Co=direct://usmc.tracks/Alpha_Co_queue?routingkey='Alpha_Co_key' > > This should work with the existing ESB code as the connection factory is > defined in qpid.jndi and the name of it through your ESB > xml file. > > Arnaud > > > > -- Jeffrey Bride RedHat / JBoss 303-523-7885