You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Rajeev Verma (JIRA)" <ji...@apache.org> on 2010/10/14 19:26:33 UTC

[jira] Updated: (TRANSPORTS-25) In-out operation is not working with IBM Websphere MQ

     [ https://issues.apache.org/jira/browse/TRANSPORTS-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rajeev Verma updated TRANSPORTS-25:
-----------------------------------

       Priority: Minor  (was: Major)
    Description: 
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 and it workd fine. 

There is a need to change JMS transport to support JMS 1.1 specification in receiver as well sender consistently.

  was:
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.


Edited as the issue reported earlier was due to some misconfiguration on my local system.

> 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
>            Priority: Minor
>
> 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 and it workd fine. 
> 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org