2 Replies Latest reply on Oct 24, 2017 11:28 PM by George Berish

    Why Won't My JMS Queue Inject into My Session Bean

    George Berish Novice

      I’m struggling to plant a learning tree worth of knowledge about WildFly 10 on which to hang more detail later.

       

      I used CLI to create two JMS Queues in standalone-full.xml.

      The entire ActiveMQ subsystem in standalone-full.xml (after I created the two queues) is pasted below.

       

      [NOTE: In case it helps spot the problem, when I open my Wildfly Browser Admin (local host:9990), its Configuration Section DOES NOT SHOW any Queues configured. I’m not sure why? But as indicated below, at least one is there, because my MDB hears it.]

       

      My PC-based Java GUI Client successfully sends JMS messages to my Wildfly JMS Queue (SendToServerQueue)

       

      My MDB successfully listens to SendToServerQueue. Then it tasks a Session Bean to Reply.

       

      My Session Bean Code tries to inject the other Queue (SendToClientQueue)with:

       

      @Resource(name="SendToClientQueue", mappedName =  java:jms/queue/sendToClientQueue"

      private Queue sendToClientQueue;

       

      But that fails. So when the Session Bean is instantiated, the Wildfly console shows this ERROR:

       

      14:57:26,820 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "GoTest.ear")]) - failure description: {

          "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.java:jms.queue.sendToClientQueue"],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.GoTest.GoTest.ReplierBean.env.SendToClientQueue is missing [jboss.naming.context.java.jboss.java:jms.queue.sendToClientQueue]"]

      }

       

      ACTIVEMQ SUBSYSTEM

              <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">

                  <server name="default">

                      <security enabled="false"/>

                      <security-setting name="#">

                          <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>

                      </security-setting>

                      <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>

                      <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>

                      <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">

                          <param name="batch-delay" value="50"/>

                      </http-connector>

                      <in-vm-connector name="in-vm" server-id="0"/>

                      <http-acceptor name="http-acceptor" http-listener="default"/>

                      <http-acceptor name="http-acceptor-throughput" http-listener="default">

                          <param name="batch-delay" value="50"/>

                          <param name="direct-deliver" value="false"/>

                      </http-acceptor>

                      <in-vm-acceptor name="in-vm" server-id="0"/>

                      <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>

                      <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>

                      <jms-queue name="SendToServerQueue" entries="java:jboss/exported/jms/queue/sendToServerQueue java:/jms/queue/sendToServerQueue"/>

                      <jms-queue name="SendToClientQueue" entries="java:jboss/exported/jms/queue/sendToClientQueue java:/jms/queue/sendToClientQueue"/>

                      <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>

                      <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>

                      <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>

                  </server>

              </subsystem>

       

      Help?