In-out operation is not working with IBM Websphere MQ
-----------------------------------------------------
Key: TRANSPORTS-25
URL: https://issues.apache.org/jira/browse/TRANSPORTS-25
Project: Axis2 Transports
Issue Type: Bug
Components: JMS
Affects Versions: 1.0.0
Environment: Operating System - Windows XP Professional
Tomcat v6.0.28
IBM Websphere MQ v7.0.1.2
Axis2 v1.5.1
JMS Transport version 1.0.0
Reporter: Rajeev Verma
We are getting a ClassCastException (can not cast com.ibm.mq.jms.MQConnection
to javax.jms.QueueConnection) with JMS Transport for in-out operation when
message is sent to reply destination. Error occurs inside createJMSSender
method of JMSOutTransportInfo class when the connection object is type casted
in QueueConnection:
if (connection != null) {
if (destType == JMSConstants.QUEUE) {
session = ((QueueConnection) connection).
createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
producer = ((QueueSession) session).createSender((Queue)
destination);
} else {
session = ((TopicConnection) connection).
createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
producer = ((TopicSession) session).createPublisher((Topic)
destination);
}
}
As a work around, I modified the configuration to use the domain specific
object com.ibm.mq.jms.MQQueueConnectionFactory instead of
com.ibm.mq.jms.MQConnectionFactory. After this change, service could not start
the listener on the input queue itself and I was getting below error while
creating a consumer for service input queue:
MQJMS1112: JMS1.1 Invalid operation for domain specific object
After some debugging I found that error occurred at this line in createConsumer
method of JMSUtils class
session.createConsumer(destination, messageSelector, pubSubNoLocal)
It seems, in case of queue destination, session.createConsumer should be
invoked without specifying pubSubNoLocal. i.e.
session.createConsumer(destination, messageSelector)
There is a need to change JMS transport to support JMS 1.1 specification in
receiver as well sender consistently.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]