2 Replies Latest reply on Feb 16, 2004 3:26 PM by Neil Davis

    Messaging from servlet

    Neil Davis Newbie

      The messaging forum is returning:
      Cannot invoke the operation : the module threw an exception
      when I try to access it. So I am posting in the next best topic...

      I have a messaging component which I wrote almost 2 years ago on JBoss 2.4.4. It still works... but the servlet using the component is throwing:

      javax.naming.NameNotFoundException: QueueConnectionFactory not bound

      Anyone know which files i need to touch to enable the servlet to see the queues? I have RTFM like 10x and been stuck here for a while. Any examples I can see for what the resource entries in these files need to look like?

      the queue/outgoing queue is set up. In the JMX MBean View for this queue, the name is queue/outgoing in the JNDIName field.

      I know I need to define this in the xml files within the EAR, but have tried all kinds of stuff, and nothing is working...


        • 1. Re: Messaging from servlet More info
          Neil Davis Newbie

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd">



          <!-- Resource Environment References -->

          <!-- Resource references -->

          <!-- EJB References -->
          <!-- JMS Connection Factories (java:comp/env/jms) -->



          <display-name>Computation Servlet</display-name>
          <![CDATA[Servlet That Audits Email]]>

          Outgoing Queue

          Java Code:
          String queueName = "queue/outgoing";
          queue = (javax.jms.Queue) jndiContext.lookup(queueName);

          [STDOUT] JNDI API lookup failed on queue/outgoing: javax.naming.NameNotFoundException: QueueConnectionFactory not bound

          • 2. Re: Messaging from servlet
            Neil Davis Newbie

            Turns out the QueueConnectionFactory became ConnectionFactory in JBoss JNDI.... when looking up context, I was specifying the old way.

            Amazing. Old component still works after fixing this!

            figured this out by getting frustrated, then walking away for a few, and referring to the Websphere price quote again. All better!!!