On 10/23/2013 11:16 AM, guenther wrote:
To answer my own question, this is how I made the "Hello World" example work
in my environment:
Thanks very much for posting back your findings! It will help me and
others that have yet to get familiar with this particular client.
On the client side, the main problem was the destination which in the
original code goes like this:
Destination destination = (Destination) context.lookup("topicExchange");
This actually will create a DestinationImpl - object.
I had to change this to
Destination destination = session.createQueue("businessRequestQueue");
to create a QueueImpl instead of a DestinationImpl for my specific
destination which has the physical name "businessRequestQueue".
(I didn't know how to make the PropertiesFileInitialContextFactory do this,
so I "hardcoded" it).
Looking at the 'hello' example, I think (someone please correct me if I
am wrong) you would have:
queue.topicExchange=businessRequestQueue
In order to lookup a Queue whose name is 'businessRequestQueue' using
the lookup key 'topicExchange' (which is a bit of an odd name, so
perhaps I misunderstood what you are looking for).
On the server side of my real application (which I used to try out the
"Hello world") I replaced the context.xml which I mentioned in my question
by the following:
<Context reloadable="true">
<Resource name="jms/ConnectionFactory" auth="Container"
type="org.apache.qpid.amqp_1_0.jms.ConnectionFactory"
description="JMS Connection Factory"
factory="com.fugro.gwf.server.jmssender.AMQFactory"
brokerURL="vm:broker:(amqp://127.0.0.1:5672)?persistent=false"/>
</Context>
This uses a custom JNDI factory named AMQFactory (because there is not
default constructor in
org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl)
That sounds like something that could get fixed if you want to raise a JIRA.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]