Results 1 to 3 of 3

Thread: How to get MDP, JBoss, and WMQ working together

  1. #1
    Join Date
    May 2006
    Posts
    15

    Default How to get MDP, JBoss, and WMQ working together

    I’m using JBoss 4.2 and Websphere JCA MQ Connector . I’m trying to create a spring MDP but I’m receiving the following error:

    MQJCA1025:Message consumer must not have a message listener.;

    Looking at WMQ’s description for this message it states:

    An application attempted to set a message listener for a JMS message consumer. This exception occurs only if the application is running in a managed environment.


    So has anyone done this. If so can someone tell me what’s wrong with what I’m doing?


    Code:
    <jee:jndi-lookup id="connectionFactory" jndi-name="java:QUEUE_MANAGER" />
    <jee:jndi-lookup id="destination" jndi-name="TEST_QUEUE" />
    
       <bean id="myMdp"  class="com.test.MyMdp" />
    
       <bean id="myMdpAdapter"
              class="org.springframework.jms.listener.adapter.MessageListenerAdapter" >
            <property name="delegate" ref="myMdp" />
            <property name="defaultListenerMethod" value="processMessage" />
            <property name="messageConverter">
                <null />
            </property>
    
        </bean>
    
    
        <bean class="org.springframework.jms.listener.SimpleMessageListenerContainer" >
            <property name="connectionFactory" ref="connectionFactory" />
            <property name="destination" ref="destination" />
            <property name="messageListener" ref="myMdpAdapter" />
    
    
        </bean>

  2. #2
    Join Date
    May 2006
    Posts
    15

    Default

    /bump

    I'm seeing similar exceptions and can't find any documentation on using MDPs in JBoss with JCA.

    I can get the DefaultMessageListenerContainer working, but if my MDP throws a RuntimeException, the message isn't put back on the Queue (sessionTransacted == true).

    If I specify the JmsTransactionmanager in addition to sessionTransacted == true, then JCA complains when the DMLC calls commit(), saying the session is not transacted.

  3. #3
    Join Date
    May 2006
    Posts
    15

    Default

    If I configure the DefaultMessageListenerContainer to use the JBoss TxM (currently on 4.0.5, so using the 'old' TxM) - the Websphere MQ JCA resource manager complains thusly:

    MQJCA1004:Distributed transactions are unavailable.
    Currently, I don't have the XA-capable MQ client JARs (supposedly in com.ibm.mqetclient.jar), and this seems to be needed if you're using the platform TxM, since receiving the message & processing the message are two separate UOWs, hence the need for XA.

    I'm trying to get the XA MQ client installed, I'll see how things fare with that.

    FYI, the ServerSessionMessageListenerContainer does not appear as though it can work with the Websphere MQ JCA adapter. Specifically, SSMLC is hard-coded to share connections and this appears to cause an Exception from the JCA adapter, which complains that a connection can only have one listener (I take this to mean: no sharing).

    Cheers,
    Brice

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •