Discussions

EJB programming & troubleshooting: Problems with MDB Queue

  1. Problems with MDB Queue (1 messages)

    I have an Entity bean that sends messages to a queue in which an MDB is also subscribed to for recieving. I know for sure that the Entity bean sends it's message fine without any exceptions but the MDB does not recieve any messages at all. In fact none of the methods are even invoked. I have a feeling I might be missing something in the descriptors?
    Any help would be greatly appreciated. Thanks.

    ---------------------------------------------------
    ejb-jar.xml:
    ---------------------------------------------------
    <message-driven >
             <description><![CDATA[]]></description>

             <ejb-name>testController</ejb-name>

             <ejb-class>testController</ejb-class>

             <transaction-type>Container</transaction-type>
             <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
             <message-driven-destination>
                <destination-type>javax.jms.Queue</destination-type>
             </message-driven-destination>

             <resource-ref >
                <res-ref-name>XAConnectionFactory</res-ref-name>
                <res-type>javax.jms.QueueConnectionFactory</res-type>
                <res-auth>Container</res-auth>
             </resource-ref>

          </message-driven>

    --------------------------------------------------
    Jboss.xml
    --------------------------------------------------
    <message-driven>
             <ejb-name>testController</ejb-name>
             <destination-jndi-name>queue/ControllerQueue</destination-jndi-name>
             <resource-ref>
                <res-ref-name>XAConnectionFactory</res-ref-name>
                <jndi-name>XAConnectionFactory</jndi-name>
             </resource-ref>
          </message-driven>

    Threaded Messages (1)

  2. Problems with MDB Queue[ Go to top ]

    I actually got it working thanks to someone else, apparently you have to java:/JmsXA as a connectionfactory when running it inside the container.