2 Replies Latest reply on Feb 27, 2013 9:18 AM by David Amorim Cortez

    Sending reply message from mdb in AS 7.1

    srinivaas venkat Novice

      Hi,

       

      Using Jboss AS 7.1.0 and Hornetq 2.2.13 Final.

       

      I have configured the jms cluster of 2 nodes having testQueue and responseQ. Also configured a MDB in remote machine and MDB is able to consume messages from the cluster of jms node. Having issues while sending the reply message from mdb. Getting below exception while trying to access the reply queue from mdb,

       

      JBAS014775:    New missing/unsatisfied dependencies:    service jboss.naming.context.java.jboss.exported.jms.queue.responseQ (missing) dependents: [service jboss.naming.context.java.comp.mdb.mdb.MDBTextListener.env."com.jms.queue.async.mdb.MDBTextListener".replyQueue]

       

      14:58:16,837 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.mdb.mdb.MDBTextListener.env.\"com.jms.queue.async.mdb.MDBTextListener\".replyQueuejboss.naming.context.java.jboss.exported.jms.queue.responseQMissing[jboss.naming.context.java.comp.mdb.mdb.MDBTextListener.env.\"com.jms.queue.async.mdb.MDBTextListener\".replyQueuejboss.naming.context.java.jboss.exported.jms.queue.responseQ]"]}}}
      14:

       

      This is the line where the exception occurs where the mdb tries to access the reply queue

      @Resource(mappedName = "java:/jboss/exported/jms/queue/responseQ")

                       <jms-destinations>


                          <jms-queue name="testQueue">
                              <entry name="queue/test"/>
                              <entry name="java:jboss/exported/jms/queue/test"/>
                          </jms-queue>
                         

                          <jms-queue name="responseQ">
                              <entry name="queue/responseQ"/>
                              <entry name="java:jboss/exported/jms/queue/responseQ"/>
                          </jms-queue>


                      </jms-destinations>

       

      Basically i'd like ot know how to get access to responseQ from within MDB. Thanks!

       

      Queue replyQueue;

       

      I've attached the mdb code and the queue definition in jms node1 and jms node2 is as shown below

       

        • 1. Re: Sending reply message from mdb in AS 7.1
          Justin Bertram Master

          Is the "responseQ" defined on the JMS nodes (i.e. remote from the MDB node)?  If so, injecting it will not work.  As far as I'm aware, injection only works for local resources.  Furthermore, you would be using the wrong JNDI name for it.  See the section on "JMS queues and topics" on https://docs.jboss.org/author/display/AS71/Messaging+configuration for more information on how to lookup a destination from a remote client.

          • 2. Re: Sending reply message from mdb in AS 7.1
            David Amorim Cortez Newbie

            Sorry to "resurrect" the topic, how you solved this problem?

             

            @Resource(mappedName = "java:/queue/Validation")

            <jms-destinations>

                                <jms-queue name="ValidationQueue">

                                    <entry name="queue/validation"/>

                                    <entry name="java:jboss/exported/jms/queue/validation"/>

                                </jms-queue>

            </jms-destinations>

             

            New missing/unsatisfied dependencies:

                  service jboss.naming.context.java.queue.Validation (missing) dependents: [service jboss.naming.context.java.comp.ProjectEAR.ProjectEJB.JmsUtil.env.".utils.JmsUtil".destination]