axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Badorrek" <mbador...@avoga.com.au>
Subject Axis2 - JMS with WebsphereMQ
Date Wed, 07 Mar 2007 21:32:45 GMT
Dear all,

I'm running Axis2 under Tomcat 5.0.28 and wish to expose a webservice through JMS.
My provider is WebspherMQ 6.0 and frankly, I'm a having a few problems.

In my "<tomcat-home>/conf/server.xml" I've defined the following resources:


-----------------------------------------------------------------
  <Resource name="jms/MyMQQueueMananager" auth="Container" type="com.ibm.mq.jms.MQQueueConnectionFactory"/>
  <ResourceParams name="jms/MyMQQueueMananager">
   <parameter>
    <name>factory</name>
    <value>com.ibm.mq.jms.MQQueueConnectionFactoryFactory</value>
   </parameter>
   <parameter>
    <name>description</name>
    <value>JMS Queue Connection Factory</value>
   </parameter>
   <parameter>
    <name>HOST</name>
    <value>localhost</value>
   </parameter>
   <parameter>
    <name>PORT</name>
    <value>1417</value>
   </parameter>
   <parameter>
    <name>CHAN</name>
    <value>CLIENTS</value>
   </parameter>
   <parameter>
    <name>TRAN</name>
    <value>1</value>
   </parameter>
   <parameter>
    <name>QMGR</name>
    <value>MGB</value>
   </parameter>
  </ResourceParams>
  
  <Resource name="jms/MYQ.IN" auth="Container" type="com.ibm.mq.jms.MQQueue"/>
  <ResourceParams name="jms/MYQ.IN">
   <parameter>
    <name>factory</name>
    <value>com.ibm.mq.jms.MQQueueFactory</value>
   </parameter>
   <parameter>
    <name>description</name>
    <value>JMS Queue</value>
   </parameter>
   <parameter>
    <name>QU</name>
    <value>Q.IN</value>
   </parameter>
  </ResourceParams>
  
  <Resource name="jms/MYQ.OUT" auth="Container" type="com.ibm.mq.jms.MQQueue"/>
  <ResourceParams name="jms/MYQ.OUT">
   <parameter>
    <name>factory</name>
    <value>com.ibm.mq.jms.MQQueueFactory</value>
   </parameter>
   <parameter>
    <name>description</name>
    <value>JMS Queue</value>
   </parameter>
   <parameter>
    <name>QU</name>
    <value>Q.OUT</value>
   </parameter>
  </ResourceParams>

------------------------------------------------------

The MQ-JMS libs are placed in "<tomcat-home>/common/lib".

So far so good. Now I have to configure Axis 2 to make use of my newly-exposed JMS resources.
My axis2.xml file contains the following entries:

------------------------------------------------------
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
    <parameter name="default" locked="false">
        <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">java:comp/env/jms/QueueConnectionFactory</parameter>
        <property name="java.naming.security.principal" value="MyRealMQUserID"/>
        <property name="java.naming.security.credentials" value="MyRealMQPassword"/>
        <parameter name="transport.jms.Destination" locked="false">MYQ.IN, MYQ.OUT</parameter>
    </parameter>
</transportReceiver>

<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
------------------------------------------------------

I deploy a simple webservice aar file to the repository using the Axis2 webtool.
I haven't touched the services.xml file of my service - I want to use the default definitions.

The first problem is that I have no message in the log saying "JMS Transport Receiver (Listener)
initialized..."  (this is from org.apache.axis2.transport.jms.JMSListener)

The second thing is that it's not clear (to me) how I tell axis2 what queue to listen on and
what queue to respond to. Do
I just put two entries in the 'transport.jms.Destination' tag with the first being the input
and the second being the output? Or
is the reply Queue set in the JMS-header of the request message?

Many thanks in advance for any help. If I get this going I'll like to submit a page for the
wiki.

Cheers,

Mark B



Mime
View raw message