5 Replies Latest reply on Feb 5, 2002 3:03 AM by pra

    MDB deploy fails, tricky JMSContainerInvoker

    garyaiki

      I need to support WebLogic and JBoss. My MDB works in WebLogic but I need help deploying in JBoss. In ch 4 of the JBoss book the example deployment descriptors show a QueueConnectionFactory tag but not in the ch 11 examples. I want to use the same ejb-jar.xml file for both WebLogic and JBoss so I don't specify QueueConnectionFactory because I don't need to in WL.

      My deployment fails in JMSContainerInvoker.start() with a NPE . In the source it fails in the ExceptionListenerImpl constructor, an inner class that looks like this:
      JMSContainerInvoker invoker;
      ExceptionListenerImpl(final JMSContainerInvoker invoker)
      {
      this.invoker = invoker;
      }
      I have 3 questions; What does a JBoss MDB descriptor need that WL doesn't, What is supposed to happen in this constructor, Why is the constructor argument final?
      OK, now I have another question, why isn't it easier to port WebLogic to JBoss? I'd have more enthusiasm for JBoss if it ran my WL app before I have to write MBeans.


        • 1. Re: MDB deploy fails, tricky JMSContainerInvoker

          Can't remember any QueueConectionFactory tag in vanilla ejb-jar. How does your desployment descriptor look?

          //Peter

          • 2. Re: MDB deploy fails, tricky JMSContainerInvoker
            garyaiki

            //ejb-jar.xml
            <message-driven>
            <ejb-name>batch-MDB</ejb-name>
            <ejb-class>
            com.x.domain.query.results.batch.BatchMSGBean
            </ejb-class>
            <transaction-type>Container</transaction-type>
            <message-driven-destination>
            <destination-type>
            javax.jms.Queue
            </destination-type>
            </message-driven-destination>
            </message-driven>
            //jboss.xml
            <message-driven>
            <ejb-name>batch-MDB</ejb-name>
            <destination-jndi-name>
            JobJMSQueue
            </destination-jndi-name>
            </message-driven>
            //jboss.jcml

            //
            Thanks, Gary

            • 3. Re: MDB deploy fails, tricky JMSContainerInvoker

              From the manual: all destinations are prefixed with either topic or queue:

              "queue/JobJMSQueue" should be the name.

              That should do the job (I hope).

              //Peter

              • 4. Re: MDB deploy fails, tricky JMSContainerInvoker
                garyaiki

                Thanks Peter,
                Changing jboss.xml from
                <destination-jndi-name>
                JobJMSQueue
                </destination-jndi-name>
                to
                <destination-jndi-name>
                queue/JobJMSQueue
                </destination-jndi-name>
                Did not solve the problem, incredibly, what solved it was changing ejb-jar.xml from
                <destination-type>
                javax.jms.Queue
                </destination-type>
                To
                <destination-type>javax.jms.Queue</destination-type>
                It was choking on whitespace! What kind of parser is this?

                • 5. Re: MDB deploy fails, tricky JMSContainerInvoker

                  It's probably not the parser (crimson) but the XML helper methods in JBoss that does not trim whitespace. Nice that it works.

                  //Peter