Hi, all.
I am attempting to provide a service outside of servicemix using the
servicemix-jms binding component.  The xbean.xml I am using is the
following:

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
       xmlns:test="http://test";
       xmlns:bais="urn:com.bais">
    <jms:endpoint service="bais:JMSTestProvider"
                  endpoint="myProvider"
                  role="provider" 
                  destinationStyle="queue"
                  jmsProviderDestinationName="queue/A"
                  connectionFactory="#connectionFactory"/>
    <bean id="connectionFactory"
        class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616" />
    </bean>   
</beans>

That part appears to be working.
I downloaded ActiveMQ 5.0 and am using the ConsumerTool example to provide a
test service.  It appears to work.  I've introduced a message into
ServiceMix which is properly routed through the jms binding component and
the ConsumerTool correctly outputs the message content.  However, when
ConsumerTool responds using:
            if (message.getJMSReplyTo() != null) {
                replyProducer.send(message.getJMSReplyTo(), 
                                session.createTextMessage("<reply>" +
message.getJMSMessageID() + "</reply>"));
            }

ServiceMix throws the following exception:

ERROR - MultiplexingProviderProcessor  - Error while handling jms message
java.lang.NullPointerException
        at
edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:160)
        at
edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:923)
        at
org.apache.servicemix.jms.multiplexing.MultiplexingProviderProcessor$1.run(MultiplexingProviderProcessor.java:107)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

When I look into the ServiceMix source at
MultiplexingProviderProcessor.java:107, it's breaking at 

InOut exchange = (InOut)
pendingExchanges.remove(message.getJMSCorrelationID());

In short, there is no correlation entry in the Map to associate the JMS
reply with.
Can anyone shed some light on what I might be doing wrong?

Thanks.
Justin
-- 
View this message in context: 
http://www.nabble.com/Correlation-problem-with-servicemix-jms-provider-tp15008454s12049p15008454.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to