Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

SJMS component and IBM WebsphereMQ class cast error

$
0
0
Hi,
I'm trying to use the sjms component with IBM MQ and I have an exception
when using an InOut exchange patter over topics. The SjmsComponent is
created using a MQConnectionFactory class.
The error occurs in the JmsObjectFactory class, createMessageConsumer
method, line 122.
121 if (topic) {
122 TopicSession ts = (TopicSession)session;

The session in actually an MQSession which is not a TopicSession. I made a
change to my local version of camel-sjms to work around this as the cast
doesn't seem necessary. I did the following:
1. removed the cast
2. just called the JmsSession createDurableSubscriber methods
3. Called the JmsSession.createConsumer methods rather than the
TopicSession.createSubscriber methods. My reading of the IBM docs implies
this is correct.

Not being an expert on JMS I'm not sure if this is correct to the spec of
just works for IBM MQ.

Any insights?

Nigel

Viewing all articles
Browse latest Browse all 5648

Trending Articles